diff options
-rw-r--r-- | net/ipv6/addrconf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c20a7c260a8f..51a273fe3d21 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3495,8 +3495,12 @@ static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa, | |||
3495 | preferred -= tval; | 3495 | preferred -= tval; |
3496 | else | 3496 | else |
3497 | preferred = 0; | 3497 | preferred = 0; |
3498 | if (valid != INFINITY_LIFE_TIME) | 3498 | if (valid != INFINITY_LIFE_TIME) { |
3499 | valid -= tval; | 3499 | if (valid > tval) |
3500 | valid -= tval; | ||
3501 | else | ||
3502 | valid = 0; | ||
3503 | } | ||
3500 | } | 3504 | } |
3501 | } else { | 3505 | } else { |
3502 | preferred = INFINITY_LIFE_TIME; | 3506 | preferred = INFINITY_LIFE_TIME; |