|
@@ -2657,8 +2657,18 @@ static void init_loopback(struct net_device *dev)
|
|
|
if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE))
|
|
if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE))
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
- if (sp_ifa->rt)
|
|
|
|
|
- continue;
|
|
|
|
|
|
|
+ if (sp_ifa->rt) {
|
|
|
|
|
+ /* This dst has been added to garbage list when
|
|
|
|
|
+ * lo device down, release this obsolete dst and
|
|
|
|
|
+ * reallocate a new router for ifa.
|
|
|
|
|
+ */
|
|
|
|
|
+ if (sp_ifa->rt->dst.obsolete > 0) {
|
|
|
|
|
+ ip6_rt_put(sp_ifa->rt);
|
|
|
|
|
+ sp_ifa->rt = NULL;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, false);
|
|
sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, false);
|
|
|
|
|
|