summaryrefslogtreecommitdiffhomepage
path: root/README
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2023-10-21 19:50:25 +0100
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2023-10-23 16:27:10 +0100
commit4bbc6e74248feeb756bd03dc500fb4f446ccfc49 (patch)
tree05ac6873b732d897f760e69f09c30250fce6bd37 /README
parentc9e619f015fdcc520c850f8a16e5046fea9660da (diff)
add hostsfile output in addition to statefile
a92c0a7 made the temporary state/leasefile hidden so that an atomic change was made and dnsmasq only saw the new file on rename. A misguided optimisation was made to only rename the temporary file if something had changed. Unfortunately only address and hostnames were considered in the change, lease durations were not. As a result it was possible for LUCI which consumes the state/leasefile to report DHCPv6 leases had expired when they had not. Revert the optimisation so that the file rename occurs irrespective of content change, this keeps LUCI reporting of state/lease expiry correct. This leaves us back with hosts file/dnsmasq update problem. Solve this by writing out a separate hosts file. Update this file using the original IP/Hostname change logic that prompts calling the 'lease' script. odhcpd config now supports a string 'hostsfile' which defines the path and name of the hosts file in an identical manner to 'leasefile'. A state 'leasefile' must be defined IF a 'hostsfile' is also required. eg. leasefile '/tmp/odhcpdstate' hostsfile '/tmp/hosts/odhcpdhosts' Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'README')
-rw-r--r--README1
1 files changed, 1 insertions, 0 deletions
diff --git a/README b/README
index 8f0e6a4..243ae24 100644
--- a/README
+++ b/README
@@ -64,6 +64,7 @@ maindhcp bool 0 Use odhcpd as the main DHCPv4
service
leasefile string DHCP/v6 lease/hostfile
leasetrigger string Lease trigger script
+hostsfile string DHCP/v6 hostfile
loglevel integer 6 Syslog level priority (0-7)