summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-01-19 11:50:46 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-03-03 15:52:27 +0000
commitd01262f521931bc5c1cb2078c5136ab45b2226df (patch)
tree6618ee2b4c90d973434f9dbd2dfac419733cfac1 /net
parentd3c38df3171bdb31d9ef24dadc855c8b40370f29 (diff)
downloadlinux-stable-d01262f521931bc5c1cb2078c5136ab45b2226df.tar.gz
linux-stable-d01262f521931bc5c1cb2078c5136ab45b2226df.tar.bz2
linux-stable-d01262f521931bc5c1cb2078c5136ab45b2226df.zip
net: igmp: fix source address check for IGMPv3 reports
commit ad23b750933ea7bf962678972a286c78a8fa36aa upstream. Commit "net: igmp: Use correct source address on IGMPv3 reports" introduced a check to validate the source address of locally generated IGMPv3 packets. Instead of checking the local interface address directly, it uses inet_ifa_match(fl4->saddr, ifa), which checks if the address is on the local subnet (or equal to the point-to-point address if used). This breaks for point-to-point interfaces, so check against ifa->ifa_local directly. Cc: Kevin Cernekee <cernekee@chromium.org> Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports") Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/igmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 62705267000d..387c5e404650 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -334,7 +334,7 @@ static __be32 igmpv3_get_srcaddr(struct net_device *dev,
return htonl(INADDR_ANY);
for_ifa(in_dev) {
- if (inet_ifa_match(fl4->saddr, ifa))
+ if (fl4->saddr == ifa->ifa_local)
return fl4->saddr;
} endfor_ifa(in_dev);