Closed updateing closed 5 years ago
A simpler reproduction could be:
ip addr change 2001:xxx/58 dev br-lan preferred_lft 0 # No preferred address, PD breaks
ip addr change 2001:xxx/58 dev br-lan preferred_lft 3600 # The address becomes preferred again but PD still does not work
Not necessary to add an extra check line as the line before was intended to check this case; I fixed it in commit https://git.openwrt.org/?p=project/odhcpd.git;a=commit;h=d404c7e50bd487f9d8d3b13e5ff1c7fa878c7973 Thx for reporting
Currently we fire an address list change event in following cases:
However there are common cases where addresses become deprecated and then preferred again. odhcpd will catch the former event (by case 4) and sets border->assigned to 0, but will not set it back to normal as it could not get notified about the latter event. Thus all PD allocations fail due to no prefix being available.
The cases can be as common as a redial on PPP interfaces, or a manual reconnection on the wan6 interface.
This commit adds another case for firing address list change event: address became preferred from deprecated, or the other way round. The former will solve the problem aforementioned, and the latter is a subset of existing case 4 so there should not be any regression.