Hi,

I have a use case where I'd like to log queries (--log-queries) and disable
negative caching (--no-negcache). One issue I found is that when using
--no-negcache, dnsmasq no longer logs NXDomain responses. Digging through
the code, it looks like as part of the dns cache insertion we will log the
response of a query. As such if the cache insertion is never executed for
negative responses (i.e --no-negcache), then the response is not logged. Is
this the intended behavior/Can this functionality be added?

I would like to have the NXDOMAIN in the logs as I would like to
differentiate between NXDOMAIN responses and failing to receive a response.

Without --no-negcache:
Sep 28 13:09:36 dnsmasq[73688]: query[A] doesnotexist54321 from 127.0.0.1
Sep 28 13:09:36 dnsmasq[73688]: forwarded doesnotexist54321 to 172.16.153.81
Sep 28 13:09:36 dnsmasq[73688]: reply doesnotexist54321 is NXDOMAIN

With --no-negcache:
Sep 28 13:10:24 dnsmasq[74398]: query[A] doesnotexist54321 from 127.0.0.1
Sep 28 13:10:24 dnsmasq[74398]: forwarded doesnotexist54321 to 172.16.153.81

Thanks,
Nick
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to