diff options
-rw-r--r-- | net/ipv6/addrconf.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 279580eab309..36ebb4ad8a0a 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3124,9 +3124,6 @@ restart: | |||
3124 | hlist_for_each_entry_rcu(ifp, node, | 3124 | hlist_for_each_entry_rcu(ifp, node, |
3125 | &inet6_addr_lst[i], addr_lst) { | 3125 | &inet6_addr_lst[i], addr_lst) { |
3126 | unsigned long age; | 3126 | unsigned long age; |
3127 | #ifdef CONFIG_IPV6_PRIVACY | ||
3128 | unsigned long regen_advance; | ||
3129 | #endif | ||
3130 | 3127 | ||
3131 | if (ifp->flags & IFA_F_PERMANENT) | 3128 | if (ifp->flags & IFA_F_PERMANENT) |
3132 | continue; | 3129 | continue; |
@@ -3134,12 +3131,6 @@ restart: | |||
3134 | spin_lock(&ifp->lock); | 3131 | spin_lock(&ifp->lock); |
3135 | age = (now - ifp->tstamp) / HZ; | 3132 | age = (now - ifp->tstamp) / HZ; |
3136 | 3133 | ||
3137 | #ifdef CONFIG_IPV6_PRIVACY | ||
3138 | regen_advance = ifp->idev->cnf.regen_max_retry * | ||
3139 | ifp->idev->cnf.dad_transmits * | ||
3140 | ifp->idev->nd_parms->retrans_time / HZ; | ||
3141 | #endif | ||
3142 | |||
3143 | if (ifp->valid_lft != INFINITY_LIFE_TIME && | 3134 | if (ifp->valid_lft != INFINITY_LIFE_TIME && |
3144 | age >= ifp->valid_lft) { | 3135 | age >= ifp->valid_lft) { |
3145 | spin_unlock(&ifp->lock); | 3136 | spin_unlock(&ifp->lock); |
@@ -3173,6 +3164,10 @@ restart: | |||
3173 | #ifdef CONFIG_IPV6_PRIVACY | 3164 | #ifdef CONFIG_IPV6_PRIVACY |
3174 | } else if ((ifp->flags&IFA_F_TEMPORARY) && | 3165 | } else if ((ifp->flags&IFA_F_TEMPORARY) && |
3175 | !(ifp->flags&IFA_F_TENTATIVE)) { | 3166 | !(ifp->flags&IFA_F_TENTATIVE)) { |
3167 | unsigned long regen_advance = ifp->idev->cnf.regen_max_retry * | ||
3168 | ifp->idev->cnf.dad_transmits * | ||
3169 | ifp->idev->nd_parms->retrans_time / HZ; | ||
3170 | |||
3176 | if (age >= ifp->prefered_lft - regen_advance) { | 3171 | if (age >= ifp->prefered_lft - regen_advance) { |
3177 | struct inet6_ifaddr *ifpub = ifp->ifpub; | 3172 | struct inet6_ifaddr *ifpub = ifp->ifpub; |
3178 | if (time_before(ifp->tstamp + ifp->prefered_lft * HZ, next)) | 3173 | if (time_before(ifp->tstamp + ifp->prefered_lft * HZ, next)) |