[Dnsmasq-discuss] dnsmasq inotify read /etc/wireguard/hosts file but then does not update its internal records....

Jelle de Jong jelledejong at powercraft.nl
Wed Nov 18 18:31:37 GMT 2020


Hello everybody,

I created the following setup.

no-hosts
hostsdir=/etc/wireguard

Nov 18 19:20:08 firewall01 dnsmasq[18828]: inotify, new or changed file 
/etc/wireguard/hosts
Nov 18 19:20:08 firewall01 dnsmasq[18828]: read /etc/wireguard/hosts - 0 
addresses
Nov 18 19:20:08 firewall01 dnsmasq-dhcp[18828]: not giving name 
laptop02.powercraft.lan to the DHCP lease of 192.168.40.150 because the 
name exists in /etc/wireguard with address 192.168.44.68
Nov 18 19:20:08 firewall01 dnsmasq-dhcp[18828]: not giving name laptop02 
to the DHCP lease of 192.168.40.150 because the name exists in 
/etc/wireguard with address 192.168.44.68

I got a script running that adds and removes host records in 
/etc/wireguard/hosts depending on there availability (ping).

However dnsmasq perfectly detects the added and removed host, but then 
does not want to update its dhcp dynamic dns records because it still 
detects the host in the hostsdir, even though it just re-scanned the 
directory and found zero hosts...

root at firewall01:~# dnsmasq --version
Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua 
TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile

What am I doing wrong? Is this the correct behavior?

Kind regards,

Jelle de Jong



More information about the Dnsmasq-discuss mailing list