From: David Miller Subject: Re: [PATCH net-next] ipv6: send netlink notifications for manually configured addresses Date: Tue, 17 Apr 2018 14:05:36 -0400 (EDT) Message-ID: <20180417.140536.2292177928357979103.davem@davemloft.net> References: <934e7797f7fb3541e36c01c5c753e0592679527b.1523956672.git.lorenzo.bianconi@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, thaller@redhat.com To: lorenzo.bianconi@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:59400 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbeDQSFi (ORCPT ); Tue, 17 Apr 2018 14:05:38 -0400 In-Reply-To: <934e7797f7fb3541e36c01c5c753e0592679527b.1523956672.git.lorenzo.bianconi@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Lorenzo Bianconi Date: Tue, 17 Apr 2018 11:54:39 +0200 > Send a netlink notification when userspace adds a manually configured > address if DAD is enabled and optimistic flag isn't set. > Moreover send RTM_DELADDR notifications for tentative addresses. > > Some userspace applications (e.g. NetworkManager) are interested in > addr netlink events albeit the address is still in tentative state, > however events are not sent if DAD process is not completed. > If the address is added and immediately removed userspace listeners > are not notified. This behaviour can be easily reproduced by using > veth interfaces: > > $ ip -b - <> link add dev vm1 type veth peer name vm2 >> link set dev vm1 up >> link set dev vm2 up >> addr add 2001:db8:a:b:1:2:3:4/64 dev vm1 >> addr del 2001:db8:a:b:1:2:3:4/64 dev vm1 > EOF > > This patch reverts the behaviour introduced by the commit f784ad3d79e5 > ("ipv6: do not send RTM_DELADDR for tentative addresses") > > Suggested-by: Thomas Haller > Signed-off-by: Lorenzo Bianconi Ok, applied to net-next. It would be really nice if we clearly documented somewhere the exact situations where we desire ipv6 address netlink notifications to be sent out. Maybe even a common function that guards the event emission, where we encode the rules. Or a comment somewhere prominent. Something like that. Right now this isn't spelled out clearly anywhere, and that's probably why things keep being adjusted back and forth like this. Thank you.