Add a network namespace parameter to rt6_purge_dflt_routers.
This is needed to call fib6_get_table with the appropriate
network namespace.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
---
include/net/ip6_route.h | 2 +-
net/ipv6/addrconf.c | 4 ++--
net/ipv6/route.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6-netns/include/net/ip6_route.h
===================================================================
--- linux-2.6-netns.orig/include/net/ip6_route.h
+++ linux-2.6-netns/include/net/ip6_route.h
@@ -99,7 +99,7 @@ extern struct rt6_info * rt6_add_dflt_ro
struct net_device *dev,
unsigned int pref);
-extern void rt6_purge_dflt_routers(void);
+extern void rt6_purge_dflt_routers(struct net *net);
extern int rt6_route_rcv(struct net_device *dev,
u8 *opt, int len,
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
@@ -3797,7 +3797,7 @@ int addrconf_sysctl_forward(ctl_table *c
addrconf_forward_change();
}
if (*valp)
- rt6_purge_dflt_routers();
+ rt6_purge_dflt_routers(&init_net);
}
return ret;
@@ -3850,7 +3850,7 @@ static int addrconf_sysctl_forward_strat
}
if (*valp)
- rt6_purge_dflt_routers();
+ rt6_purge_dflt_routers(&init_net);
} else
*valp = new;
Index: linux-2.6-netns/net/ipv6/route.c
===================================================================
--- linux-2.6-netns.orig/net/ipv6/route.c
+++ linux-2.6-netns/net/ipv6/route.c
@@ -1699,13 +1699,13 @@ struct rt6_info *rt6_add_dflt_router(str
return rt6_get_dflt_router(gwaddr, dev);
}
-void rt6_purge_dflt_routers(void)
+void rt6_purge_dflt_routers(struct net *net)
{
struct rt6_info *rt;
struct fib6_table *table;
/* NOTE: Keep consistent with rt6_get_dflt_router */
- table = fib6_get_table(&init_net, RT6_TABLE_DFLT);
+ table = fib6_get_table(net, RT6_TABLE_DFLT);
if (table == NULL)
return;
--
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers