[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408127576-11518-3-git-send-email-jiri@resnulli.us>
Date: Fri, 15 Aug 2014 20:32:56 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, stephen@...workplumber.org,
cwang@...pensource.com, pshelar@...ira.com,
nicolas.dichtel@...nd.com, therbert@...gle.com,
dborkman@...hat.com, edumazet@...gle.com
Subject: [patch net-next 3/3] ipv6: check propagates sk in sk_mc_loop instead of skb->sk
In the dst->output() path for ip6tunnel_xmit, the code assumes the skb
it has to transmit is attached to an inet socket, specifically via
ip6_finish_output2(): The sk_mc_loop() test triggers a WARN_ON() when the
provider of the packet is an AF_PACKET socket.
Signed-off-by: Jiri Pirko <jiri@...nulli.us>
---
net/ipv6/ip6_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index e2c93c6..a889a96 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -70,7 +70,7 @@ static int ip6_finish_output2(struct sock *sk, struct sk_buff *skb)
if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) {
struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
- if (!(dev->flags & IFF_LOOPBACK) && sk_mc_loop(skb->sk) &&
+ if (!(dev->flags & IFF_LOOPBACK) && sk_mc_loop(sk) &&
((mroute6_socket(dev_net(dev), skb) &&
!(IP6CB(skb)->flags & IP6SKB_FORWARDED)) ||
ipv6_chk_mcast_addr(dev, &ipv6_hdr(skb)->daddr,
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists