]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit8220ea23243178c16b87fc3ccadf071647b64e04
treeda65935527f572bf9f0c0b13b3147e916543e9a3
parent51ed7f3e7d33824820837ad784801973f147c51a
net: inet_diag: always export IPV6_V6ONLY sockopt for listening sockets

Reconsidering my commit 20462155 "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