DHCP static leases stopped working properly

Hi all, I'm having troubles with static leases on the latest release. I'm using odhcpd/unbound, the combination used to work fine until I sysupgraded to 23.05.3.

I can no longer change an IP address in the static leases, devices will keep getting assigned the first one they got, even if I specify a different one. Also assigned hostnames no longer work, devices don't respect the hostname from the static lease anymore.

I noticed that I could have multiple MAC addresses associated to the same IP now, I don't recall being able to do that before so something definitely changed in how DHCP is handled with that new release.

Any idea what's going on? I could revert to using dnsmasq with unbound, but I'd really like to keep using odhcpd.

I'm running into the same problem.

I think found the problem!

In /etc/config/dhcp, I have working static leases defined as follows:

config host
        option name 'myhostname'
        option ip '192.168.1.X'
        option mac 'XX:XX:XX:XX:XX:XX'
        option dns '1'

After editing such an entry in Luci with openwrt version 23.05.x, they are changed into:

config host
        option name 'myhostname'
        option ip '192.168.1.X'
        list mac 'XX:XX:XX:XX:XX:XX'
        option dns '1'

Notice how the option mac line changed into list mac! These entries appear to be ignored by odchpd because it hands out dynamic leases instead. I guess this is a new feature to support multiple MAC addresses, but the syntax isn't yet supported by odhcp?

@dedeckeh Can you have a look at this?

1 Like