[Dnsmasq-discuss] Dnsmasq stops resolving addresses after return from suspend and wlan re-assoc
toke at toke.dk
Fri Dec 12 07:17:30 GMT 2014
Simon Kelley <simon at thekelleys.org.uk> writes:
> I just pushed code into git which uses inotify to track changes.
> Dnsmasq should now re-read the file whenever it is closed after being
> open for write, or when it's moved into the parent directory.
> I'm pretty sure (unless I've done it wrong) that this will fix your
> problem. Please could you try it?
Hmm, the problem remains even with the inotify patch. This is what I see
in my syslog after a return from suspend:
Dec 12 08:05:04 alrua-x1 kernel: wlan0: associated
Dec 12 08:05:06 alrua-x1 wpa_actiond: Interface 'wlan0' reestablished connection to network 'tohojo'
Dec 12 08:05:06 alrua-x1 systemd-networkd: wlan0 : gained carrier
Dec 12 08:05:06 alrua-x1 systemd-networkd: wlan0 : DHCPv4 address 10.42.8.59/27 via 10.42.8.33
Dec 12 08:05:06 alrua-x1 avahi-daemon: Joining mDNS multicast group on interface wlan0.IPv4 with address 10.42.8.59.
Dec 12 08:05:06 alrua-x1 dnsmasq: reading /etc/dnsmasq-resolv.conf
Dec 12 08:05:06 alrua-x1 avahi-daemon: New relevant interface wlan0.IPv4 for mDNS.
Dec 12 08:05:06 alrua-x1 avahi-daemon: Registering new address record for 10.42.8.59 on wlan0.IPv4.
Dec 12 08:05:06 alrua-x1 dnsmasq: ignoring nameserver 127.0.0.1 - local interface
Looking at the file:
$ cat /etc/dnsmasq-resolv.conf
# This file is managed by systemd-resolved(8). Do not edit.
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.
I'm guessing it might have something to do with this:
$ ls -l /etc/dnsmasq-resolv.conf
4,0K lrwxrwxrwx 1 root root 32 Jun 26 18:19 /etc/dnsmasq-resolv.conf -> /run/systemd/resolve/resolv.conf
Changing the dnsmasq conf to point to /run/systemd/resolve/resolv.conf
directly, things seem to work right; I see seven reloads of the file
after returning from suspend, the last one picking up the right
Maybe dnsmasq should resolve symlinks before setting up the inotify?
More information about the Dnsmasq-discuss