1
0
Fork 0
forked from mirror/openwrt
openwrt/package/base-files/files/etc/uci-defaults
David Härdeman a660a076db base-files: generate a global DHCP DUID
odhcp6c and odhcpd currently generate custom DUIDS on a per-interface basis
using the MAC address of the given interface.

This is contrary to how DUIDs are meant to be used, as the client identifier
will vary from interface to interface, while it is meant to remain stable for a
given host, no matter how the network hardware changes (see RFC8415, §11).

The same problem exists in odhcpd, which also generates server-side DUIDs on a
per-interface basis.

In order to support a stable per-device DUID, generate one on first boot and
store it via uci.

Currently, a DUID-UUID style clientid is generated. This is mostly meant as an
RFC, and we might consider using a different kind of DUID instead (DUID-LLT,
DUID-EN).

One drawback is that this will typically change the DUID used on existing
OpenWrt devices when upgrading to a new release. However, that seems
unavoidable and is a one-time pain in order to have stable DUIDs (and in many
cases, it shouldn't cause any issues).

v2: move the uci cfg generation outside of an IPv6-only block since this
is relevant to the DHCPv4 client as well

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20359
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-19 19:46:22 +02:00
..
10_migrate-shadow base-files: remove shebang from uci-defaults files 2019-11-13 12:50:57 +01:00
11_network-migrate-bridges base-files: migrate old UCI network sections defining bridges 2024-06-19 12:47:58 +02:00
12_network-generate-ula base-files: reduce IPv6 ULA prefix generation to a single call 2024-04-18 12:55:31 +02:00
13_fix-group-user base-files: skip fix-group-user uci-default for APK installation 2024-06-11 23:58:18 +02:00
14_network-generate-clientid base-files: generate a global DHCP DUID 2025-10-19 19:46:22 +02:00
50-root-passwd base-files: improve default root-passwd script 2024-11-13 07:53:47 +01:00