From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
yoshfuji@linux-ipv6.org, stephen@networkplumber.org,
cwang@twopensource.com, pshelar@nicira.com,
nicolas.dichtel@6wind.com, therbert@google.com,
dborkman@redhat.com, edumazet@google.com
Subject: [patch net-next 3/3] ipv6: check propagates sk in sk_mc_loop instead of skb->sk
Date: Fri, 15 Aug 2014 20:32:56 +0200 [thread overview]
Message-ID: <1408127576-11518-3-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1408127576-11518-1-git-send-email-jiri@resnulli.us>
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@resnulli.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
next prev parent reply other threads:[~2014-08-15 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 18:32 [patch net-next 1/3] net: propagate sock pointer through netfilter hooks Jiri Pirko
2014-08-15 18:32 ` [patch net-next 2/3] vxlan: propagate sock pointer to ip6tunnel_xmit path Jiri Pirko
2014-08-15 18:32 ` Jiri Pirko [this message]
2014-08-22 0:33 ` [patch net-next 1/3] net: propagate sock pointer through netfilter hooks David Miller
2014-08-22 5:56 ` Jiri Pirko
2014-08-25 14:05 ` Jiri Pirko
2014-08-25 18:51 ` David Miller
2014-08-25 19:29 ` Jiri Pirko
2014-08-25 19:52 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408127576-11518-3-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=jmorris@namei.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pshelar@nicira.com \
--cc=stephen@networkplumber.org \
--cc=therbert@google.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).