[Dnsmasq-discuss] Dnsmasq stops resolving addresses after return from suspend and wlan re-assoc

Simon Kelley simon at thekelleys.org.uk
Fri Dec 12 08:26:38 GMT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 12/12/14 07:17, Toke Høiland-Jørgensen wrote:
> 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[2303]: Interface 'wlan0' reestablished
> connection to network 'tohojo' Dec 12 08:05:06 alrua-x1
> systemd-networkd[1841]: wlan0           : gained carrier Dec 12
> 08:05:06 alrua-x1 systemd-networkd[1841]: wlan0           : DHCPv4
> address 10.42.8.59/27 via 10.42.8.33 Dec 12 08:05:06 alrua-x1
> avahi-daemon[2720]: Joining mDNS multicast group on interface
> wlan0.IPv4 with address 10.42.8.59. Dec 12 08:05:06 alrua-x1
> dnsmasq[5465]: reading /etc/dnsmasq-resolv.conf Dec 12 08:05:06
> alrua-x1 avahi-daemon[2720]: New relevant interface wlan0.IPv4 for
> mDNS. Dec 12 08:05:06 alrua-x1 avahi-daemon[2720]: Registering new
> address record for 10.42.8.59 on wlan0.IPv4. Dec 12 08:05:06
> alrua-x1 dnsmasq[5465]: 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.
> 
> nameserver 127.0.0.1 nameserver 10.42.8.33
> 
> 
> 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 nameserver...
> 
> Maybe dnsmasq should resolve symlinks before setting up the
> inotify?
> 

That sounds sensible, I shall continue my tour around the farther
reaches of the Unix file API. Later....


Cheers,

Simon.

> -Toke
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUiqa9AAoJEBXN2mrhkTWisv0P/2FwLjkbbME3Jiu+Q0Yzoib/
0EDKZO91oL3Mr8EdzRopCVCK4W4G7Unfj/PQNGF13bX+OCIOSAymDdZlaS93OmIN
2leJ6GbO/bATGERTvjyMafbmCUPJFXs1QreFQ7QEsYVISUV2clr6W0IuKfcSLw7b
SLkjAlG22/WNK/SH84hSUlZ2IZ1OcXcqluoGTdZVPy3nFR1T1iHic/PAOq1c+Jls
7eD2cbX4526bRmdVLvFrAsZvQYepVTknTpIuIT0Xxj6VBd01UcOSoAuuWEgJNFW2
KnRYslzVAL6LXvolN4rATmJ4aw8/1QAI/2WDCV4IyJ0EOgIBoB3InbgjNZCPfcGD
amqMY4Dddd75BocJY6KLqkcPExmYwefQyJqkO5Nq0T2u8K2HL8PoLvLSCtnwZspw
OWNdGkb5brMLtE7dPEhUtrOFQCkk+iel+b8eQ4FUeKkGy8/JchwSWqjsLtlpsu2m
S4T4EWN2DSksRJPnyYg0TX7bWqvDZHNgYKTEBtBlRcs+XAOcLXdMxGYIp9HE8s7O
rgL+aUxksRoxmFvYRs6mKk9/NqFzNoZ7Rdgptx8VXYR6SVQYogqYkse9xfWIPFzb
8kdMm1DTNC7t86G8g3X/EgbwjXyrgwj5759kLomOjv9RHi0YSUcjvs8WVLzDPbo0
VgzXYyJNt59Nfzq0FDJH
=pTL8
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list