diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-22 02:06:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-22 02:06:42 +0200 |
commit | e2a7c34fb2856fd5306e307e170e3dde358d0dce (patch) | |
tree | afeb300b04186b1a1f649b2cd8a401a75878297c /net/ipv4/igmp.c | |
parent | net: sched: Add the invalid handle check in qdisc_class_find (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff) | |
download | linux-e2a7c34fb2856fd5306e307e170e3dde358d0dce.tar.xz linux-e2a7c34fb2856fd5306e307e170e3dde358d0dce.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r-- | net/ipv4/igmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 9f86b5133605..ab183af0b5b6 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1007,10 +1007,18 @@ int igmp_rcv(struct sk_buff *skb) { /* This basically follows the spec line by line -- see RFC1112 */ struct igmphdr *ih; - struct in_device *in_dev = __in_dev_get_rcu(skb->dev); + struct net_device *dev = skb->dev; + struct in_device *in_dev; int len = skb->len; bool dropped = true; + if (netif_is_l3_master(dev)) { + dev = dev_get_by_index_rcu(dev_net(dev), IPCB(skb)->iif); + if (!dev) + goto drop; + } + + in_dev = __in_dev_get_rcu(dev); if (!in_dev) goto drop; |