* [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down
@ 2016-07-22 17:32 Mike Manning
2016-07-22 17:37 ` David Ahern
2016-07-25 18:17 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Mike Manning @ 2016-07-22 17:32 UTC (permalink / raw)
To: netdev; +Cc: Mike Manning
Default kernel behavior is to delete IPv6 addresses on link
down, which entails deletion of the multicast and the
subnet-router anycast addresses. These deletions do not
happen with sysctl setting to keep global IPv6 addresses on
link down, so every link down/up causes an increment of the
anycast and multicast refcounts. These bogus refcounts may
stop these addrs from being removed on subsequent calls to
delete them. The solution is to leave the groups for the
multicast and subnet anycast on link down for the callflow
when global IPv6 addresses are kept.
Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Mike Manning <mmanning@brocade.com>
---
net/ipv6/addrconf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 47f837a..047c75a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3562,6 +3562,10 @@ restart:
if (state != INET6_IFADDR_STATE_DEAD) {
__ipv6_ifa_notify(RTM_DELADDR, ifa);
inet6addr_notifier_call_chain(NETDEV_DOWN, ifa);
+ } else {
+ if (idev->cnf.forwarding)
+ addrconf_leave_anycast(ifa);
+ addrconf_leave_solict(ifa->idev, &ifa->addr);
}
write_lock_bh(&idev->lock);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down
2016-07-22 17:32 [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down Mike Manning
@ 2016-07-22 17:37 ` David Ahern
2016-07-25 18:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2016-07-22 17:37 UTC (permalink / raw)
To: Mike Manning, netdev
On 7/22/16 11:32 AM, Mike Manning wrote:
> Default kernel behavior is to delete IPv6 addresses on link
> down, which entails deletion of the multicast and the
> subnet-router anycast addresses. These deletions do not
> happen with sysctl setting to keep global IPv6 addresses on
> link down, so every link down/up causes an increment of the
> anycast and multicast refcounts. These bogus refcounts may
> stop these addrs from being removed on subsequent calls to
> delete them. The solution is to leave the groups for the
> multicast and subnet anycast on link down for the callflow
> when global IPv6 addresses are kept.
>
> Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
> Signed-off-by: Mike Manning <mmanning@brocade.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down
2016-07-22 17:32 [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down Mike Manning
2016-07-22 17:37 ` David Ahern
@ 2016-07-25 18:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-07-25 18:17 UTC (permalink / raw)
To: mmanning; +Cc: netdev
From: Mike Manning <mmanning@brocade.com>
Date: Fri, 22 Jul 2016 18:32:11 +0100
> Default kernel behavior is to delete IPv6 addresses on link
> down, which entails deletion of the multicast and the
> subnet-router anycast addresses. These deletions do not
> happen with sysctl setting to keep global IPv6 addresses on
> link down, so every link down/up causes an increment of the
> anycast and multicast refcounts. These bogus refcounts may
> stop these addrs from being removed on subsequent calls to
> delete them. The solution is to leave the groups for the
> multicast and subnet anycast on link down for the callflow
> when global IPv6 addresses are kept.
>
> Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
> Signed-off-by: Mike Manning <mmanning@brocade.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-25 18:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 17:32 [PATCH v2] net: ipv6: Always leave anycast and multicast groups on link down Mike Manning
2016-07-22 17:37 ` David Ahern
2016-07-25 18:17 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox