summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@chromium.org>2017-12-11 11:13:45 -0800
committerBen Hutchings <ben@decadent.org.uk>2018-03-03 15:52:27 +0000
commitd3c38df3171bdb31d9ef24dadc855c8b40370f29 (patch)
treeeac12d107536f2309ebee7b4a15329ee01bac6a9 /include/linux
parent81619a39b447cf0fc5f8dbd46308da4a3ffb90bb (diff)
net: igmp: Use correct source address on IGMPv3 reports
commit a46182b00290839fa3fa159d54fd3237bd8669f0 upstream. Closing a multicast socket after the final IPv4 address is deleted from an interface can generate a membership report that uses the source IP from a different interface. The following test script, run from an isolated netns, reproduces the issue: #!/bin/bash ip link add dummy0 type dummy ip link add dummy1 type dummy ip link set dummy0 up ip link set dummy1 up ip addr add 10.1.1.1/24 dev dummy0 ip addr add 192.168.99.99/24 dev dummy1 tcpdump -U -i dummy0 & socat EXEC:"sleep 2" \ UDP4-DATAGRAM:239.101.1.68:8889,ip-add-membership=239.0.1.68:10.1.1.1 & sleep 1 ip addr del 10.1.1.1/24 dev dummy0 sleep 5 kill %tcpdump RFC 3376 specifies that the report must be sent with a valid IP source address from the destination subnet, or from address 0.0.0.0. Add an extra check to make sure this is the case. Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions