Skip to content

Commit

Permalink
ipv6 netns: init net is used to set bindv6only for new sock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jun 9, 2008
1 parent 1420a4f commit 2e761e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int inet6_create(struct net *net, struct socket *sock, int 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.
Expand Down

0 comments on commit 2e761e0

Please sign in to comment.