Patchwork [1/2] IPv6: keep route for tentative address

login
register
mail settings
Submitter stephen hemminger
Date May 24, 2010, 6:31 p.m.
Message ID <20100524113118.47cc9852@nehalam>
Download mbox | patch
Permalink /patch/53452/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

stephen hemminger - May 24, 2010, 6:31 p.m.
Recent changes preserve IPv6 address when link goes down (good).
But would cause address to point to dead dst entry (bad).
The simplest fix is to just not delete route if address is
being held for later use.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b)
---
Patch is for 2.6.34-stable (problem doesn't exist in earlier kernel)

 net/ipv6/addrconf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Greg KH - May 24, 2010, 6:47 p.m.
On Mon, May 24, 2010 at 11:31:18AM -0700, Stephen Hemminger wrote:
> Recent changes preserve IPv6 address when link goes down (good).
> But would cause address to point to dead dst entry (bad).
> The simplest fix is to just not delete route if address is
> being held for later use.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b)
> ---
> Patch is for 2.6.34-stable (problem doesn't exist in earlier kernel)

Normally I wait for David to send networking patches for the stable
trees, so I would like to get David's ack on these two before I am
willing to apply them.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - May 24, 2010, 8:52 p.m.
From: Greg KH <greg@kroah.com>
Date: Mon, 24 May 2010 11:47:13 -0700

> On Mon, May 24, 2010 at 11:31:18AM -0700, Stephen Hemminger wrote:
>> Recent changes preserve IPv6 address when link goes down (good).
>> But would cause address to point to dead dst entry (bad).
>> The simplest fix is to just not delete route if address is
>> being held for later use.
>> 
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> (cherry picked from commit 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b)
>> ---
>> Patch is for 2.6.34-stable (problem doesn't exist in earlier kernel)
> 
> Normally I wait for David to send networking patches for the stable
> trees, so I would like to get David's ack on these two before I am
> willing to apply them.

These two are fine to go to -stable, Greg please integrate.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 413054f..12e9558 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4047,7 +4047,8 @@  static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
 			addrconf_leave_anycast(ifp);
 		addrconf_leave_solict(ifp->idev, &ifp->addr);
 		dst_hold(&ifp->rt->u.dst);
-		if (ip6_del_rt(ifp->rt))
+
+		if (ifp->dead && ip6_del_rt(ifp->rt))
 			dst_free(&ifp->rt->u.dst);
 		break;
 	}