[Dnsmasq-discuss] [PATCH] --local is broken

Petr Menšík pemensik at redhat.com
Tue Oct 5 20:50:09 UTC 2021

I have already reported it, but might got lost in different thread.


I took a look at the change, it seems it was intentional. Your proposed
change would break something else Simon tried to fix in commit 26bbf5a3
I think.

I think --address=/#/ got broken. Which should be roughly
equivalent to --address=/./, now that just . is accepted itself.
It got threated as --address=// in previous versions by mistake.
Your fix would restore --local=/test/, but would break this part
again. That is why I had not attached patch to it, because correct fix
it more demanding. And address+server parsing is complicated enough now.
I think --local should emit warning if used with an address. I think its
intention was to be used just with domains like --local=/invalid/,
entries containing server also should use --server instead.


On 10/5/21 20:52, Dominik Derigs wrote:
> Hey Simon,
> Since commit "Fix --address=/#/...... which was lost in 2.86"
> (26bbf5a314d833beaf0f147d24409969f05f3dba) --local being a
> synonym for --server is broken as --local became a synonym for --
> address.
> The attached patch fixes this.
> This was reported on the Pi-hole forums:
>> I have local=/fritz.box/ in my /etc/dnsmasq.d/02-
>> localdns.conf config file. This worked fine until upgrading
>> pihole last night. Now all queries to FQDNs such as google.com
>> get responded with google.com.fritz.box and ip address
>> Changing the line to server=/fritz.box/ restores the
>> previous handling. However, according to the dnsmasq manpage "-
>> -local is a synonym for --server to make configuration files
>> clearer in this case."
> Best,
> Dominik
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20211005/f4975185/attachment.htm>

More information about the Dnsmasq-discuss mailing list