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

UCI "leasefile" location is not initialized #95

Closed EricLuehrsen closed 5 years ago

EricLuehrsen commented 7 years ago

odhcpd is designed to be directly tied to the UCI format. However if leasefile directory does not exist, then odhcpd does not create it. odhcpd should create the leasefile directory and blank file on startup as given by the user. It could be filtered to only allow /tmp/..., /var/lib/odhcpd/..., /usr/local/... or other normal location per std. file hierarchy.

The file /tmp/hosts/odhcpd is created by /etc/init.d/dnsmasq. /tmp/ is typically mapped to RAM in OpenWrt/LEDE, so its all gone at boot. It is altogether reasonable that someone might remove package dnsmasq for Unbound or Bind. It is also reasonable for someone to map away from /tmp/hosts/odhcpd (tmpfs, RAM) and perhaps to /var/lib/odhcpd (external sD or something).

dedeckeh commented 7 years ago

@EricLuehrsen Creation of leasefile directory is fixed in commit https://git.lede-project.org/?p=project/odhcpd.git;a=commit;h=0572d1abbadf7b955f2788d04ca3d00f45963e6a

EricLuehrsen commented 7 years ago

@dedeckeh again thanks. (kept open pending maintenance issue...)