From e4e707a93baf615f9b1dab37044428225362c52b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Sun, 26 Oct 2025 00:02:32 +0200 Subject: [PATCH] luci-mod-network: add odhcpd cfg in DHCP server setup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The "Set up DHCP Server" button is meant to setup the basics for a DHCP server on the given interface. Add odhcpd setting "dhcpv4" as well. It is a no-op in case odhcpd isn't setup to take care of DHCPv4 as well, but it makes it easier to support either dnsmasq or odhpcd as the DHCPv4 server. One might argue that the button should also set dhcpv6=server and ra=server, so that it doesn't only setup a DHCPv4 server, but also prepares a DHCPv6 server, but that's for another PR :) Signed-off-by: David Härdeman --- .../htdocs/luci-static/resources/view/network/interfaces.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 347adea585..a949ccb7b3 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -691,8 +691,8 @@ return view.extend({ uci.set('dhcp', section_id, 'start', 100); uci.set('dhcp', section_id, 'limit', 150); uci.set('dhcp', section_id, 'leasetime', '12h'); - } - else { + uci.set('dhcp', section_id, 'dhcpv4', 'server'); + } else { uci.set('dhcp', section_id, 'ignore', 1); } }); -- 2.30.2