diff options
author | Benjamin Thery <benjamin.thery@bull.net> | 2008-12-11 01:07:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-11 01:07:08 +0100 |
commit | bd91b8bf372911c1e4d66d6bb44fe409349a6791 (patch) | |
tree | 18a79fc3c86ad833523562d7b73a9a557207b51b /net/ipv6/ip6_output.c | |
parent | net: Make static (diff) | |
download | linux-bd91b8bf372911c1e4d66d6bb44fe409349a6791.tar.xz linux-bd91b8bf372911c1e4d66d6bb44fe409349a6791.zip |
netns: ip6mr: allocate mroute6_socket per-namespace.
Preliminary work to make IPv6 multicast forwarding netns-aware.
Make IPv6 multicast forwarding mroute6_socket per-namespace,
moves it into struct netns_ipv6.
At the moment, mroute6_socket is only referenced in init_net.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7d92fd97cfb9..4b15938bef4d 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -137,7 +137,8 @@ static int ip6_output2(struct sk_buff *skb) struct inet6_dev *idev = ip6_dst_idev(skb->dst); if (!(dev->flags & IFF_LOOPBACK) && (!np || np->mc_loop) && - ((mroute6_socket && !(IP6CB(skb)->flags & IP6SKB_FORWARDED)) || + ((mroute6_socket(dev_net(dev)) && + !(IP6CB(skb)->flags & IP6SKB_FORWARDED)) || ipv6_chk_mcast_addr(dev, &ipv6_hdr(skb)->daddr, &ipv6_hdr(skb)->saddr))) { struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |