ipv6: Clamp reported valid_lft to a minimum of 0
commitf56619fc72407561b00c52244a2caa53d730bc4a
authorBen Hutchings <ben@decadent.org.uk>
Sat, 26 Jun 2010 11:37:47 +0000 (26 11:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jun 2010 17:28:43 +0000 (30 10:28 -0700)
tree9201b8700d4f8e185def920261a3cb718494cdcb
parent5a9dbfe08ee17f0dc9ecff647eba3d04afa01200
ipv6: Clamp reported valid_lft to a minimum of 0

Since addresses are only revalidated every 2 minutes, the reported
valid_lft can underflow shortly before the address is deleted.
Clamp it to a minimum of 0, as for prefered_lft.

Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c