OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ac530b
)
ipv6: avoid wraparound for expired preferred lifetime
author
Jens Rosenboom
<me@jayr.de>
Thu, 25 Jun 2009 04:55:50 +0000
(
04:55
+0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 26 Jun 2009 03:03:50 +0000
(20:03 -0700)
Avoid showing wrong high values when the preferred lifetime of an address
is expired.
Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c
patch
|
blob
|
history
diff --git
a/net/ipv6/addrconf.c
b/net/ipv6/addrconf.c
index
8c1e86a
..
3883b40
100644
(file)
--- 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,
valid = ifa->valid_lft;
if (preferred != INFINITY_LIFE_TIME) {
long tval = (jiffies - ifa->tstamp)/HZ;
- preferred -= tval;
+ if (preferred > tval)
+ preferred -= tval;
+ else
+ preferred = 0;
if (valid != INFINITY_LIFE_TIME)
valid -= tval;
}