openwrt/odhcpd

odhcp does not handle existing leases from odhcpd.leases file correctly

schuettecarsten opened this issue · 1 comments

I've moved the odhcpd.leases file to an attached USB storage. I can see that odhcpd writes leases into this file. When the router reboots, existing IPv6 leases are imported and shown in OpenWrt UI, but when the next device connects to the network and requests an IPv6 address, old leases are dropped completely and only the new lease "survives".

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/opt/data/odhcpd.leases'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

File content after reboot:

root@GatewayDummi:/opt/data# cat odhcpd.leases
fd2b:43d7:e9a:b2::6f9   laptopc3253.lan laptopc3253
# br-lan 000100012d08fb46e446b02b2317 1a2c6dc1 laptopc3253 1713258035 6f9 128 fd2b:43d7:e9a:b2::6f9/128
# br-lan 0003000668a40e8694e4 12345678 - 1713258215 d08 128 fd2b:43d7:e9a:b2::d08/128

File content after the first IPv6 lease:

root@GatewayDummi:/opt/data# cat odhcpd.leases
fd2b:43d7:e9a:b2::6f9   laptopc3253.lan laptopc3253
# br-lan 000100012d08fb46e446b02b2317 1a2c6dc1 laptopc3253 1713259959 6f9 128 fd2b:43d7:e9a:b2::6f9/128