Description
I have found a possible issue with LuCI, but I am not sure if it is a bug or just the expected behavior: when I create or update a Static Lease in LuCI, I have noticed that at the time I click on "Save & Apply" the configuration, any dhcp_boot option previously set using uci CLI is removed.
Is this behavior expected? If so, is there any workaround to make sure the custom dhcp_boot configuration remain in place when the configuration is updated using LuCI?
I have not found any place in LuCI where I can set these DHCP options so I had to set them using the uci CLI.
OpenWrt setup
- Firmware version: OpenWrt 21.02.1 r16325-88151b8303 / LuCI openwrt-21.02 branch git-21.295.67054-13df80d
- Model: Linksys WRT1900ACS
- I am using the default dnsmasq package (didn't install any extra package for DHCP)
Steps to reproduce
- SSH into the router
- Add some custom DHCP boot options
$ uci add_list dhcp.@dnsmasq[0].dhcp_boot='pxelinux.0,mybootserver,192.168.1.209'
$ uci commit dhcp
$ /etc/init.d/dnsmasq restart
- Validate that the configuration is present in uci:
$ uci show dhcp.@dnsmasq[0].dhcp_boot
dhcp.cfg01411c.dhcp_boot='pxelinux.0,mybootserver,192.168.1.209'
-
At this point, I tested a PXE boot on one of my devices and it worked as expected so the configuration was properly loaded into dnsmasq.
-
Log into the LuCI web interface and go to Network > DHCP and DNS > Static Leases
-
Create a new static lease (or update an existing one)
-
Click on Save & Apply
-
SSH into the router
-
Check if the dhcp_boot rule still exists
$ uci show dhcp.@dnsmasq[0].dhcp_boot
uci: Entry not found
$ uci show dhcp | grep boot_options
[returns nothing]
Expected result
I was expecting for the dhcp_boot configuration to remain in place
Actual result
The dhcp_boot configuration is removed