ipv6 netns: init net is used to set bindv6only for new sock
authorPavel Emelyanov <xemul@openvz.org>
Mon, 9 Jun 2008 22:53:30 +0000 (15:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jun 2008 22:53:30 +0000 (15:53 -0700)
The bindv6only is tuned via sysctl. It is already on a struct net
and per-net sysctls allow for its modification (ipv6_sysctl_net_init).

Despite this the value configured in the init net is used for the
rest of them.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/af_inet6.c

index 3c6aafb02183deaf7a0e52cd934687a736e34171..e84b3fd17fb4de37e3212bd55892f132f38d6098 100644 (file)
@@ -191,7 +191,7 @@ lookup_protocol:
        np->mcast_hops  = -1;
        np->mc_loop     = 1;
        np->pmtudisc    = IPV6_PMTUDISC_WANT;
-       np->ipv6only    = init_net.ipv6.sysctl.bindv6only;
+       np->ipv6only    = net->ipv6.sysctl.bindv6only;
 
        /* Init the ipv4 part of the socket since we can have sockets
         * using v6 API for ipv4.