netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv4: suppress NETDEV_UP notification on address lifetime update
@ 2015-07-26 16:18 David Ward
  2015-07-29  6:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ward @ 2015-07-26 16:18 UTC (permalink / raw)
  To: netdev; +Cc: David Ward

This notification causes the FIB to be updated, which is not needed
because the address already exists, and more importantly it may undo
intentional changes that were made to the FIB after the address was
originally added. (As a point of comparison, when an address becomes
deprecated because its preferred lifetime expired, a notification on
this chain is not generated.)

The motivation for this commit is fixing an incompatibility between
DHCP clients which set and update the address lifetime according to
the lease, and a commercial VPN client which replaces kernel routes
in a way that outbound traffic is sent only through the tunnel (and
disconnects if any further route changes are detected via netlink).

Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
 net/ipv4/devinet.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e813196..2d9cb17 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -882,7 +882,6 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
 		queue_delayed_work(system_power_efficient_wq,
 				&check_lifetime_work, 0);
 		rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid);
-		blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
 	}
 	return 0;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/ipv4: suppress NETDEV_UP notification on address lifetime update
  2015-07-26 16:18 [PATCH] net/ipv4: suppress NETDEV_UP notification on address lifetime update David Ward
@ 2015-07-29  6:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-07-29  6:38 UTC (permalink / raw)
  To: david.ward; +Cc: netdev

From: David Ward <david.ward@ll.mit.edu>
Date: Sun, 26 Jul 2015 12:18:58 -0400

> This notification causes the FIB to be updated, which is not needed
> because the address already exists, and more importantly it may undo
> intentional changes that were made to the FIB after the address was
> originally added. (As a point of comparison, when an address becomes
> deprecated because its preferred lifetime expired, a notification on
> this chain is not generated.)
> 
> The motivation for this commit is fixing an incompatibility between
> DHCP clients which set and update the address lifetime according to
> the lease, and a commercial VPN client which replaces kernel routes
> in a way that outbound traffic is sent only through the tunnel (and
> disconnects if any further route changes are detected via netlink).
> 
> Signed-off-by: David Ward <david.ward@ll.mit.edu>

Yeah, this makes sense, applied.

I bet the SCTP notifier could have ended up with dups in it's local
address list because of this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-29  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-26 16:18 [PATCH] net/ipv4: suppress NETDEV_UP notification on address lifetime update David Ward
2015-07-29  6:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).