summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorEdward Chron <echron@arista.com>2019-01-31 15:00:40 -0800
committerDavid S. Miller <davem@davemloft.net>2019-02-03 09:54:05 -0800
commit1d2f4ebbbeb1ec055dcd3cf3dba833cfd0a84f3a (patch)
tree54befe3292a9c39fa94f44b0bdb55b65770e4c12 /net/ipv4/route.c
parentf66ebd14a71bd50a46801a7cabd779a1a324bf76 (diff)
downloadlinux-1d2f4ebbbeb1ec055dcd3cf3dba833cfd0a84f3a.tar.bz2
ipv4/igmp: Don't drop IGMP pkt with zeros src addr
Don't drop IGMP packets with a source address of all zeros which are IGMP proxy reports. This is documented in Section 2.1.1 IGMP Forwarding Rules of RFC 4541 IGMP and MLD Snooping Switches Considerations. Signed-off-by: Edward Chron <echron@arista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 99be68b15da0..16259ea9df54 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1608,7 +1608,8 @@ int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
return -EINVAL;
if (ipv4_is_zeronet(saddr)) {
- if (!ipv4_is_local_multicast(daddr))
+ if (!ipv4_is_local_multicast(daddr) &&
+ ip_hdr(skb)->protocol != IPPROTO_IGMP)
return -EINVAL;
} else {
err = fib_validate_source(skb, saddr, 0, tos, 0, dev,