diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_output.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index e34013a78ef4..3451799e3dbf 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -254,7 +254,7 @@ int ip_mc_output(struct sk_buff *skb) | |||
254 | */ | 254 | */ |
255 | 255 | ||
256 | if (rt->rt_flags&RTCF_MULTICAST) { | 256 | if (rt->rt_flags&RTCF_MULTICAST) { |
257 | if ((!sk || inet_sk(sk)->mc_loop) | 257 | if (sk_mc_loop(sk) |
258 | #ifdef CONFIG_IP_MROUTE | 258 | #ifdef CONFIG_IP_MROUTE |
259 | /* Small optimization: do not loopback not local frames, | 259 | /* Small optimization: do not loopback not local frames, |
260 | which returned after forwarding; they will be dropped | 260 | which returned after forwarding; they will be dropped |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index cd48801a8d6f..eb6d09728633 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -121,10 +121,9 @@ static int ip6_output2(struct sk_buff *skb) | |||
121 | skb->dev = dev; | 121 | skb->dev = dev; |
122 | 122 | ||
123 | if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) { | 123 | if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) { |
124 | struct ipv6_pinfo* np = skb->sk ? inet6_sk(skb->sk) : NULL; | ||
125 | struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb)); | 124 | struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb)); |
126 | 125 | ||
127 | if (!(dev->flags & IFF_LOOPBACK) && (!np || np->mc_loop) && | 126 | if (!(dev->flags & IFF_LOOPBACK) && sk_mc_loop(skb->sk) && |
128 | ((mroute6_socket(dev_net(dev)) && | 127 | ((mroute6_socket(dev_net(dev)) && |
129 | !(IP6CB(skb)->flags & IP6SKB_FORWARDED)) || | 128 | !(IP6CB(skb)->flags & IP6SKB_FORWARDED)) || |
130 | ipv6_chk_mcast_addr(dev, &ipv6_hdr(skb)->daddr, | 129 | ipv6_chk_mcast_addr(dev, &ipv6_hdr(skb)->daddr, |