Skip to content

Commit

Permalink
netns: ipmr: enable namespace support in ipv4 multicast routing code
Browse files Browse the repository at this point in the history
This last patch makes the appropriate changes to use and propagate the
network namespace where needed in IPv4 multicast routing code.

This consists mainly in replacing all the remaining init_net occurences
with current netns pointer retrieved from sockets, net devices or
mfc_caches depending on the routines' contexts.

Some routines receive a new 'struct net' parameter to propagate the current
netns:
* vif_add/vif_delete
* ipmr_new_tunnel
* mroute_clean_tables
* ipmr_cache_find
* ipmr_cache_report
* ipmr_cache_unresolved
* ipmr_mfc_add/ipmr_mfc_delete
* ipmr_get_route
* rt_fill_info (in route.c)

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Benjamin Thery authored and David S. Miller committed Jan 22, 2009
1 parent f6bb451 commit 4feb88e
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 114 deletions.
3 changes: 2 additions & 1 deletion include/linux/mroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ void mfc_net_set(struct mfc_cache *mfc, struct net *net)

#ifdef __KERNEL__
struct rtmsg;
extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
extern int ipmr_get_route(struct net *net, struct sk_buff *skb,
struct rtmsg *rtm, int nowait);
#endif

#endif
Loading

0 comments on commit 4feb88e

Please sign in to comment.