odhcpd: allow assignments to be reassigned
authorDavid Härdeman <[email protected]>
Sat, 20 Sep 2025 21:19:29 +0000 (23:19 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 9 Oct 2025 06:58:51 +0000 (08:58 +0200)
commite0b2c3cf9476b25e317b7fcfa63b7accc34f054c
tree684169a530b0acf0994d73d2dbb6ef7f405ff53f
parent01e5e311b0db2ab80a179e217c2785964023be3c
odhcpd: allow assignments to be reassigned

In a nutshell, this allows static leases which have only been configured
with a DUID (so no IAID specified) to be reassigned to any client with
the same DUID (but potentially different IAID). This matches how
multiple MAC addresses are handled in the DHCPv4 case, and supports the
use case for e.g. moving from WiFi to ethernet.

On the other hand, it is probably not what one would want for e.g. a
server that has several NICs connected to the same network. For those
cases, defining static leases with DUID and IAID anyway seems
preferrable (and it will also ensure a static interface<->IPv6 addr
mapping).

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/255
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv6-ia.c