mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-08 05:32:09 -05:00
The old command generates an often incorrect variable length UUID instead of a fixed 16-octet hex string. Ref: https://datatracker.ietf.org/doc/html/rfc8415#section-11.5 Signed-off-by: Alice H. <alice.hall0451+github@gmail.com>
10 lines
276 B
Plaintext
10 lines
276 B
Plaintext
[ "$(uci -q get network.globals.dhcp_default_duid)" != "auto" ] && exit 0
|
|
|
|
uci -q batch <<-EOF >/dev/null
|
|
# DUID-UUID - RFC6355
|
|
set network.globals.dhcp_default_duid="$(printf '%s%s' '0004' $(cat /proc/sys/kernel/random/uuid | sed -e 's/-//g'))"
|
|
commit network
|
|
EOF
|
|
|
|
exit 0
|