Skip to content

Commit 93fa159

Browse files
stephen hemmingerdavem330
authored andcommitted
IPv6: keep route for tentative address
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>
1 parent 3941f18 commit 93fa159

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/addrconf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4047,7 +4047,8 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
40474047
addrconf_leave_anycast(ifp);
40484048
addrconf_leave_solict(ifp->idev, &ifp->addr);
40494049
dst_hold(&ifp->rt->u.dst);
4050-
if (ip6_del_rt(ifp->rt))
4050+
4051+
if (ifp->dead && ip6_del_rt(ifp->rt))
40514052
dst_free(&ifp->rt->u.dst);
40524053
break;
40534054
}

0 commit comments

Comments
 (0)