net: igmp: fix source address check for IGMPv3 reports
Subsystems (3)
PATCH 1/1 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.
--- net/ipv4/igmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/igmp.c +1 -1
@@ -332,7 +332,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);
Signature · 1 line
2.14.2
From: Felix Fietkau <[email protected]>
Date: Fri, 19 Jan 2018 11:50:46 +0100
Quoted 7 lines
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 usesinet_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).
Quoted 7 lines
This breaks for point-to-point interfaces, so check against
ifa->ifa_localdirectly.Cc Kevin Cernekee <[email protected]>Fixes a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")Reported-by Sebastian Gottschall <[email protected]>Signed-off-by Felix Fietkau <[email protected]>
Applied, thanks.
Quoted 13 lines · David Miller
From: Felix Fietkau <[email protected]>
Date: Fri, 19 Jan 2018 11:50:46 +0100Quoted 10 lines
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 usesinet_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_localdirectly.
Quoted 6 lines
Quoted 4 lines
Cc Kevin Cernekee <[email protected]>Fixes a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")Reported-by Sebastian Gottschall <[email protected]>Signed-off-by Felix Fietkau <[email protected]>Applied, thanks.
Thanks. Please queue it up for stable as well, since the commit fixed by this patch has already made it to stable kernels.
- Felix
David Miller
maintainerFrom: Felix Fietkau <[email protected]>
Date: Tue, 23 Jan 2018 10:48:59 +0100
Quoted 14 lines · David Miller
Quoted 13 lines
From: Felix Fietkau <[email protected]>
Date: Fri, 19 Jan 2018 11:50:46 +0100Quoted 10 lines
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 usesinet_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_localdirectly.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Cc Kevin Cernekee <[email protected]>Fixes a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")Reported-by Sebastian Gottschall <[email protected]>Signed-off-by Felix Fietkau <[email protected]>Applied, thanks.
Thanks. Please queue it up for stable as well, since the commit fixed by this patch has already made it to stable kernels.
I did, thank you.