[Dnsmasq-discuss] [BUG] dnsmasq rewriting NXDOMAIN to NOERROR

Simon Kelley simon at thekelleys.org.uk
Mon Jul 5 20:12:10 UTC 2021

On 05/07/2021 19:31, Kevin Darbyshire-Bryant wrote:
>> On 5 Jul 2021, at 16:53, Dominik DL6ER <dl6er at dl6er.de> wrote:
>> Hey Simon,
>> the current dnsmasq master version contains a bug rewriting all
>> NXDOMAIN replies from upstream with NOERROR.
>> The error has been introduced in commit
>> d0ae3f5a4dc094e8fe2a3c607028c1c59f42f473 (see attached diff) and is
>> ultimately caused by
> Oooh what fun! :-)
> Attached patch fixes for me

That's not the correct fix.

check_for_local_domain() returns true for names which are handled and
looked up in the cache, from /etc/hosts, or configuration, like

lookup_domain(..., F_CONFIG, .....) checks for addresses associated with
whole domains, so if the query is www.example.com and there exists

so OR is the correct conjunction. The problem was that the new code in
lookup_domain() got the wrong answer sometimes.

df25f204ba822c9c00bc9372c85da58e9aff6e86 fixes.



More information about the Dnsmasq-discuss mailing list