netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: addrconf: don't remove address state on ifdown if the address is being kept
@ 2010-10-28  4:16 Lorenzo Colitti
  2010-10-28  6:45 ` Lorenzo Colitti
  0 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Colitti @ 2010-10-28  4:16 UTC (permalink / raw)
  To: netdev; +Cc: Maciej Żenczykowski, David Miller, Brian Haley

Currently, addrconf_ifdown does not delete statically configured IPv6
addresses when the interface is brought down. The intent is that when
the interface comes back up the address will be usable again. However,
this doesn't actually work, because the system stops listening on the
corresponding solicited-node multicast address, so the address cannot
respond to neighbor solicitations and thus receive traffic. Also, the
code notifies the rest of the system that the address is being deleted
(e.g, RTM_DELADDR), even though it is not. Fix it so that none of this
state is updated if the address is being kept on the interface.

--- a/net/ipv6/addrconf.c	2010-10-20 13:30:22.000000000 -0700
+++ b/net/ipv6/addrconf.c	2010-10-27 21:04:39.000000000 -0700
@@ -2737,10 +2737,7 @@ static int addrconf_ifdown(struct net_de
 			/* Flag it for later restoration when link comes up */
 			ifa->flags |= IFA_F_TENTATIVE;
 			ifa->state = INET6_IFADDR_STATE_DAD;
-
-			write_unlock_bh(&idev->lock);
-
-			in6_ifa_hold(ifa);
+			continue;
 		} else {
 			list_del(&ifa->if_list);

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

end of thread, other threads:[~2010-11-12 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28  4:16 [PATCH] ipv6: addrconf: don't remove address state on ifdown if the address is being kept Lorenzo Colitti
2010-10-28  6:45 ` Lorenzo Colitti
2010-11-05  6:45   ` Lorenzo Colitti
2010-11-05 15:12     ` David Miller
2010-11-12 21:45   ` 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).