Skip to contentSkip to conversation

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

PATCH Applied Pavel Emelyanov 2 participants 2 messages Jun 5, 2008 – Jun 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fits both net-2.6 and net-next-26

---

net/ipv6/af_inet6.c +1 -1
index 3c6aafb..e84b3fd 100644
@@ -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.
maintainer Applied
#1 lore raw

From: Pavel Emelyanov <[email protected]>
Date: Thu, 05 Jun 2008 14:37:30 +0400

Quoted 9 lines

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.

Fits both net-2.6 and net-next-26

Applied to net-2.6, thanks Pavel.