[Cerowrt-devel] DHCPv4 lease file empty, DHCPv6 lease shows "expired"

Simon Kelley simon at thekelleys.org.uk
Tue May 6 14:12:50 EDT 2014


On 04/05/14 22:00, Chuck Anderson wrote:

> b. Modify dnsmasq and odhcpd to measure elapsed time rather than
>    storing the current wallclock time-of-day for the start of each
>    lease.  Maybe using the Linux system uptime seconds-since-boot
>    would work. 


Dnsmasq can do this already. Build with -DHAVE_BROKEN_RTC



>    Unfortunately, this would be problematic for
>    maintaining leases when the system is rebooted.  Does Cero/OpenWrt
>    even maintain leases over reboots?  The RFCs say this is mandatory,
>    but I wonder given that the lease files are stored under /tmp.  Is
>    /tmp maintained over reboots?
> 

I don't know if CeroWRT keeps the leases in non-volatile storage, but if
it does, then dnsmasq with HAVE_BROKEN_RTC keeps lease-time-remaining
rather then time-lease-expires, so the effect of a reboot is simply to
extend DHCP leases for the duration of the downtime.


Cheers,


Simon.




More information about the Cerowrt-devel mailing list