tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

IPv6 prefix route lifetime



Hi List

With recent (well a few versions ago) changes to dhcpcd(8), it no longer destroys prefix routes if there is no reason to (yay, NFS). However, this has introduced a new problem that seems to be present in all BSD kernels that a freshly added IPv6 address NOT via in kernel RA will add the prefix route to it's internal list:
https://nxr.netbsd.org/xref/src/sys/netinet6/in6.c#650

However, subsequent calls to re-add the address OR adjust the address lifetimes do not update the prefix route times in nd6_rtr. This means that the prefix route will timeout no matter what we do, the result being that dhcpcd will add a replacement route, but the kernel will then remove it (as according to it, it has expired, which is wrong).

We have two ways of fixing this:
1) Adjust the vltime and pltime of the prefix route when adding an address or adjusting address lifetimes.
2) Stop adding the route via nd6_prelist_add (as found in nd6_rtr.c).

The benefit of 1) is that the change is less intrusive.
The benefit of 2) is that ndp -p will stop telling a partial story anyway as it won't display prefix routes without an address assigned (handled outside the kernel anyway) and for added prefixes with vltimes they always seem to be expired because they are not owned by a router.

Comments on which way to fix this are welcome, I personally favor 2).

Roy


Home | Main Index | Thread Index | Old Index