[Dnsmasq-discuss] dnsmasq and VPN client updates resolv.conf with multiple nameservers

Johannes Stezenbach js at sig21.net
Thu Nov 4 09:00:03 UTC 2021


On Thu, Nov 04, 2021 at 07:46:18AM +0100, Geert Stappers via Dnsmasq-discuss wrote:
> On Wed, Nov 03, 2021 at 11:45:15PM +0100, Johannes Stezenbach wrote:
> > 
> > I've tried current git version v2.87test4-2-g9560658c5ba2.
> > 
> > Usually /run/dnsmasq/resolv.conf has only one entry for my
> > home Wifi router.
> > When I enable a VPN connection two more entries are added,
> > but dnsmasq doesn't read it correctly.
> 
> } but dnsmasq doesn't deal with it as I expected.
> or
> } but dnsmasq doesn't deal with it as I hoped for.

It is a regression compared to cbbd56c96583, which I used before
because it had the fix for an issue I had reported.

> > Real:
> > nameserver 10.x.xx.60
> > nameserver 10.x.xx.75
> > nameserver 192.168.178.1
> >
> > dnsmasq log:
> > Nov  3 23:19:56 dnsmasq[31323]: reading /run/dnsmasq/resolv.conf
> > Nov  3 23:19:56 dnsmasq[31323]: using nameserver 192.168.178.1#53
> > Nov  3 23:19:56 dnsmasq[31323]: using nameserver 10.x.xx.75#53
> > Nov  3 23:19:56 dnsmasq[31323]: using nameserver 192.168.178.1#53

> > FWIW I still use --strict-order.
 
I suppose --strict-order could play a role here.

> My guess it that reloading  dnsmasq after VPN open / close cloud help.

On restart dnsmasq reads it correctly. Sorry I neglected to
clearly desribe this problem only happens when dnsmasq
re-reads the /run/dnsmasq/resolv.conf after it changed.
I tried SIGHUP but it doesn't work to re-read the file.
"touch /run/dnsmasq/resolv.conf" causes dnsmasq to
re-read it again, but with same result.


Thanks,
Johannes



More information about the Dnsmasq-discuss mailing list