odhcp6c: expire processing and script calling

Jonas Lochmann openwrt at jonaslochmann.de
Fri Oct 31 03:15:20 PDT 2025


There is the PR about the "ipv6 iol intact certification" [1]. There is
no useful description but I found out that this is about the results
from some automated testing tool that found issues with odhcp6c.

One of those issues could be solved by my PR [2]. Two others remain.
Both are related to DNS related RA items that do not seem to expire
correctly. Right now, the expiry is implemented mostly within netifd.
However, odhcp6c does the same thing too. There are two issues with it:

- the expired items are removed from the odhcp6c internal state, but
  this does not trigger calling the hook script; it is also unclear
  which "action" would be used if the expiry caused changes
- the expiry is processed whenever something is received (RA or DHCP
  reply) but it would be necassary to also process it when something
  is due (which would be as simple as calculating the minimum valid
  value and schedule the expire task with this delay except if the
  minimum is the "never expires" magic value)

The proposed solution in the existing PR [1] involves bigger
architectural changes by exporting the expire times to netifd and
let it deal with it. Still, I see an advantage of keeping this
within odhcp6c for use cases involving odhcp6c without netifd
(e.g. outside of OpenWrt; Debian contains odhcp6c too and if I
knew that earlier I would have used it in some setup; in this
case, I definitly would not want to develop a custom expire
processing).

It is probably best to wait with this topic until the "Purple
patchset" [3] is done that adds ubus support and makes the DHCP
part async.

[1] https://github.com/openwrt/odhcp6c/pull/97
[2] https://github.com/openwrt/odhcp6c/pull/108
[3] https://github.com/openwrt/odhcp6c/pull/106



More information about the openwrt-devel mailing list