openwrt/odhcpd

Option leasetime doesn't work

Eninspace opened this issue · 2 comments

I use odhcp without dnsmasq and in my config I use params below and lease time doesn't setup for luci it is 'unlimited' and in /tmp/hosts/odhcpd it is '-1'

config host
option mac 'xx:xx:xx:xx:xx:xx'
option name 'somename'
option leasetime '24h'

version odhcpd: 2019-12-16-e53fec89-3
version openwrt: 19.07.1 r10911-c155900f66

Please re-test with the odhcpd version on master as this will only work on the master version.
Also double check if the DHCPv6 client is sending its mac address in the DUID option otherwise the static lease won't be hit.

The leasetime behavior for static leases is changed in commit https://git.openwrt.org/?p=project/odhcpd.git;a=commit;h=a90cc2e147b0f6e429c4e5e3e4e42e00b01ec32c; the leasetime of the assignment will be equal to the leasetime given to the DHCPv6 client for static assignments