diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8c1e86afbbf5..3883b4036a74 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3362,7 +3362,10 @@ static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa, | |||
3362 | valid = ifa->valid_lft; | 3362 | valid = ifa->valid_lft; |
3363 | if (preferred != INFINITY_LIFE_TIME) { | 3363 | if (preferred != INFINITY_LIFE_TIME) { |
3364 | long tval = (jiffies - ifa->tstamp)/HZ; | 3364 | long tval = (jiffies - ifa->tstamp)/HZ; |
3365 | preferred -= tval; | 3365 | if (preferred > tval) |
3366 | preferred -= tval; | ||
3367 | else | ||
3368 | preferred = 0; | ||
3366 | if (valid != INFINITY_LIFE_TIME) | 3369 | if (valid != INFINITY_LIFE_TIME) |
3367 | valid -= tval; | 3370 | valid -= tval; |
3368 | } | 3371 | } |