In one of our labs we have a router sending RA's where the prefix info
option has both valid and preferred lifetime set to infinity
On a client configured for stateless address autoconfiguration, the
addresses and prefix routes are created as expected when the RA is
but the prefix routes get expired after < 30 seconds. After adding some
debug and further testing I found that when
valid lifetime >= 0x7fffffff * HZ (HZ=250, USER_HZ=100 in our
this condition occurs and prefix routes are prematurely expired.
We are using 2.6.20 + patches but I also tested with the latest Ubuntu
2.6.24-16 with the same results. This is repeatable simply by booting
the liveCD option using Ubuntu 8.04 desktop. No config changes
just plug into an IPV6 network where you can change the RA Prefix Info
lifetimes. Do "ip -6 route list" a bunch of times. You will see the
added with huge expiry times and they will count down as expected. The
time fib garbage collection runs the routes disappear. Using valid
such as 900, 3600, 86400, etc work just fine.
Looking at net/ipv6/addrconf.c the problem appears to be in
addrconf_prefix_rcv() after the "Avoid arithmetic overflow" comment.
the comment the lifetimes have been read into valid_lft and
Clearly RFC4861 specifies that these are both u32 in units of seconds
0xffffffff = infinity. Reading through RFC4862/ADDRCONF 5.5.3, there
no further limitations placed on the lifetimes other than the rules to
prevent the DoS case.
Problem #1 the infinity case is not specifically handled
Problem #2 premature expiration when valid_lft > 0x7ffffffff * HZ.
Let me know if further information is needed and if I should submit
a bug in bugzilla.