Skip to content

Commit ad23b75

Browse files
nbd168davem330
authored andcommitted
net: igmp: fix source address check for IGMPv3 reports
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 <[email protected]> Fixes: a46182b ("net: igmp: Use correct source address on IGMPv3 reports") Reported-by: Sebastian Gottschall <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 121d57a commit ad23b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/igmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static __be32 igmpv3_get_srcaddr(struct net_device *dev,
332332
return htonl(INADDR_ANY);
333333

334334
for_ifa(in_dev) {
335-
if (inet_ifa_match(fl4->saddr, ifa))
335+
if (fl4->saddr == ifa->ifa_local)
336336
return fl4->saddr;
337337
} endfor_ifa(in_dev);
338338

0 commit comments

Comments
 (0)