openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
162 stars 98 forks source link

Bug: Peristent Lease Storage wrt. RFC2131 Section 2.1 and Section 3.1.4 #98

Open EricLuehrsen opened 7 years ago

EricLuehrsen commented 7 years ago

RFC2131 DHCPv4 expects that the DHCP leases and other configuration results are in persistent storage. For small embedded routers during a machine reboot, it has been accepted that read-write memory is RAM (not flash) and persistence may not be entirely upheld. That being said, odhcpd has no means to maintain the lease information even through an application restart (example ifup event). The lease file odhcpd writes is not used to seed odhcpd, if it is restarted. If the lease file is mapped away from /tmp/... (RAM) and maybe to /var/lib/odhcpd/ (external sD or USB flash), then even odhcpd cannot restore the lease state(s) after a reboot.