[patch 35/38][IPV6] addrconf - Add a network namespace parameter to addrconf_forward_change
Add a network namespace parameter to addrconf_forward_change to remove reference to init_net and make it more generic. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> --- net/ipv6/addrconf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: linux-2.6-netns/net/ipv6/addrconf.c =================================================================== --- linux-2.6-netns.orig/net/ipv6/addrconf.c +++ linux-2.6-netns/net/ipv6/addrconf.c @@ -451,13 +451,13 @@ static void dev_forward_change(struct in } -static void addrconf_forward_change(void) +static void addrconf_forward_change(struct net *net) { struct net_device *dev; struct inet6_dev *idev; read_lock(&dev_base_lock); - for_each_netdev(&init_net, dev) { + for_each_netdev(net, dev) { rcu_read_lock(); idev = __in6_dev_get(dev); if (idev) { @@ -3808,7 +3808,7 @@ int addrconf_sysctl_forward(ctl_table *c } } else { ipv6_devconf_dflt.forwarding = ipv6_devconf.forwarding; - addrconf_forward_change(); + addrconf_forward_change(&init_net); } if (*valp) rt6_purge_dflt_routers(&init_net); @@ -3860,7 +3860,7 @@ static int addrconf_sysctl_forward_strat dev_forward_change(idev); } else { *valp = new; - addrconf_forward_change(); + addrconf_forward_change(&init_net); } if (*valp) -- _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers