Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e761e05 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller
Browse files

ipv6 netns: init net is used to set bindv6only for new sock



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: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1420a4fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.