OpenVZ Forum


Home » Mailing lists » Devel » [patch 29/38][IPV6] route6 - Pass the network namespace parameter to rt6_purge_dflt_routers
[patch 29/38][IPV6] route6 - Pass the network namespace parameter to rt6_purge_dflt_routers [message #24270] Mon, 03 December 2007 16:17
Daniel Lezcano is currently offline  Daniel Lezcano
Messages: 417
Registered: June 2006
Senior Member
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
 
Read Message
Previous Topic: [patch 28/38][IPV6] route6 - Pass network namespace to rt6_add_route_info and rt6_get_route_info
Next Topic: [patch 30/38][IPV6] route6 - make route6 per namespace
Goto Forum:
  


Current Time: Fri Aug 15 15:10:03 GMT 2025

Total time taken to generate the page: 0.33762 seconds