aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.im>2014-09-05 09:09:03 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-09 14:27:09 -0400
commit49a601589caaf0e93194c0cc9b4ecddbe75dd2d5 (patch)
treecb4486c3522885f9b6bb61f10960e3b7b27a5b4f /net/ipv6
parentafddacc3ccd048c49c7f4f0ad0b6a40730c74715 (diff)
net/ipv4: bind ip_nonlocal_bind to current netns
net.ipv4.ip_nonlocal_bind sysctl was global to all network namespaces. This patch allows to set a different value for each network namespace. Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/af_inet6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index b9393e6a21fe..e4865a3ebe1d 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -302,7 +302,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
302 /* Reproduce AF_INET checks to make the bindings consistent */ 302 /* Reproduce AF_INET checks to make the bindings consistent */
303 v4addr = addr->sin6_addr.s6_addr32[3]; 303 v4addr = addr->sin6_addr.s6_addr32[3];
304 chk_addr_ret = inet_addr_type(net, v4addr); 304 chk_addr_ret = inet_addr_type(net, v4addr);
305 if (!sysctl_ip_nonlocal_bind && 305 if (!net->ipv4.sysctl_ip_nonlocal_bind &&
306 !(inet->freebind || inet->transparent) && 306 !(inet->freebind || inet->transparent) &&
307 v4addr != htonl(INADDR_ANY) && 307 v4addr != htonl(INADDR_ANY) &&
308 chk_addr_ret != RTN_LOCAL && 308 chk_addr_ret != RTN_LOCAL &&