From patchwork Fri Jul 30 17:51:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [071/205] IPv6: keep route for tentative address Date: Fri, 30 Jul 2010 07:51:28 -0000 From: gregkh@suse.de X-Patchwork-Id: 60376 Message-Id: <20100730175140.078725467@clark.site> To: linux-kernel@vger.kernel.org, stable@kernel.org, Emil S Tantilov Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, NetDev , Greg KH , "David S. Miller" , , Stephen Hemminger 2.6.34-stable review patch. If anyone has any objections, please let us know. ------------------ From: Stephen Hemminger (cherry picked from commit 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b) 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 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 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4047,7 +4047,8 @@ static void __ipv6_ifa_notify(int event, 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; }