luci-mod-network: add global DUID cfg option
authorDavid Härdeman <[email protected]>
Fri, 10 Oct 2025 08:16:35 +0000 (10:16 +0200)
committerPaul Donald <[email protected]>
Sun, 19 Oct 2025 21:31:19 +0000 (23:31 +0200)
This exposes the default DHCP DUID config option in the LuCI interface.

For reference:
https://github.com/openwrt/openwrt/pull/20359
https://github.com/openwrt/odhcpd/pull/274

Signed-off-by: David Härdeman <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 548bc65fe41308f349b6e20c5f121322070ea661..5768304e66f516d92c0e4f1156fdd1da5c589261 100644 (file)
@@ -1659,6 +1659,11 @@ return view.extend({
                        _('This prefix is randomly generated at first install.'));
                o.datatype = 'cidr6';
 
+               o = s.option(form.Value, 'dhcp_default_duid', _('Default DUID'),
+                       _('The default <abbr title="DHCP Unique Identifier">DUID</abbr> for this device, used when acting as a DHCP server or client. The client identifier can be overridden on a per-interface basis.') + '<br />' +
+                       _('This identifier is randomly generated the first time the device is booted.'));
+               o.datatype = 'and(rangelength(6,260),hexstring)';
+
                const l3mdevhelp1 = _('%s services running on this device in the default VRF context (ie., not bound to any VRF device) shall work across all VRF domains.');
                const l3mdevhelp2 = _('Off means VRF traffic will be handled exclusively by sockets bound to VRFs.');