]> git.baikalelectronics.ru Git - kernel.git/commit
net: inet_diag: always export IPV6_V6ONLY sockopt for listening sockets
authorPhil Sutter <phil@nwl.cc>
Fri, 10 Jul 2015 09:39:57 +0000 (11:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Jul 2015 06:25:24 +0000 (23:25 -0700)
commitc4974c44f6b472b44a3153c91bac1a504f72ecaf
treeda65935527f572bf9f0c0b13b3147e916543e9a3
parent2348b38f81c09064a2e152066aedcd1be7fddb08
net: inet_diag: always export IPV6_V6ONLY sockopt for listening sockets

Reconsidering my commit cc60f5ac "net: inet_diag: export IPV6_V6ONLY
sockopt", I am not happy with the limitations it causes for socket
analysing code in userspace. Exporting the value only if it is set makes
it hard for userspace to decide whether the option is not set or the
kernel does not support exporting the option at all.

>From an auditor's perspective, the interesting question for listening
AF_INET6 sockets is: "Does it NOT have IPV6_V6ONLY set?" Because it is
the unexpected case. This patch allows to answer this question reliably.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_diag.c