From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: [PATCH net-next 3/3] net: ipv6: flush neighbor entries when carrier is off Date: Sun, 5 Nov 2017 22:57:53 -0800 Message-ID: <1509951473-25990-4-git-send-email-dsahern@gmail.com> References: <1509951473-25990-1-git-send-email-dsahern@gmail.com> Cc: jhs@mojatatu.com, David Ahern , Satish Ashok To: netdev@vger.kernel.org Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:55395 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbdKFG6F (ORCPT ); Mon, 6 Nov 2017 01:58:05 -0500 Received: by mail-pg0-f65.google.com with SMTP id 15so7486854pgc.12 for ; Sun, 05 Nov 2017 22:58:05 -0800 (PST) In-Reply-To: <1509951473-25990-1-git-send-email-dsahern@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Similar to IPv4, flush non-permanent neighbor entries on carrier down to improve path selection for multipath routes. Signed-off-by: Satish Ashok Signed-off-by: David Ahern --- net/ipv6/addrconf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5a8a10229a07..85bddff5eac6 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3432,6 +3432,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, run_pending = 1; } } else if (event == NETDEV_CHANGE) { + if (idev && idev->cnf.ignore_routes_with_linkdown) + neigh_carrier_down(&nd_tbl, dev); + if (!addrconf_link_ready(dev)) { /* device is still not ready. */ break; -- 2.1.4