[Dnsmasq-discuss] No forgetting logic when using hostsdir

Kevin 'ldir' Darbyshire-Bryant ldir at darbyshire-bryant.me.uk
Sun May 17 11:28:11 BST 2020


The man page sayeth: (http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html)

--hostsdir=<path>
Read all the hosts files contained in the directory. New or changed files are read automatically. See --dhcp-hostsdir for details.

--dhcp-hostsdir=<path>
This is equivalent to --dhcp-hostsfile, except for the following. The path MUST be a directory, and not an individual file. Changed or new files within the directory are read automatically, without the need to send SIGHUP. If a file is deleted or changed after it has been read by dnsmasq, then the host record it contained will remain until dnsmasq receives a SIGHUP, or is restarted; ie host records are only added dynamically.


To re-iterate:

Host entries from dynamically read files will remain in dnsmasq’s memory if removed from those file/s unless dnsmasq is persuaded to forget them, either by SIGHUP or a complete restart.

Personally I would find it a welcome option if dnsmasq could also dynamically forget entries.  I suspect it is not as simple as it sounds otherwise it would have been implemented.


More information about the Dnsmasq-discuss mailing list