Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753779AbdLMRP2 (ORCPT ); Wed, 13 Dec 2017 12:15:28 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:59826 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753741AbdLMRP0 (ORCPT ); Wed, 13 Dec 2017 12:15:26 -0500 Date: Wed, 13 Dec 2017 18:15:16 +0100 From: Andrew Lunn To: Kevin Cernekee Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: igmp: Use correct source address on IGMPv3 reports Message-ID: <20171213171516.GH28466@lunn.ch> References: <20171211191345.104136-1-cernekee@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171211191345.104136-1-cernekee@chromium.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1101 Lines: 33 On Mon, Dec 11, 2017 at 11:13:45AM -0800, Kevin Cernekee wrote: > 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 Reviewed-by: Andrew Lunn Andrew