On 21/10/2022 22:23, Michael Traxler wrote:
When you disable the DNS-server via
port=0

the /etc/hosts file is ignored and also the
addn-hosts=<fn>
is ignored.

On 31.10.22 21:07, Simon Kelley wrote:
It's at least a documentation bug. I think the reasoning behind the behaviour is that setting port=0 disables all the DNS functionality, which can be useful for its own sake, but also saves machine resources; no memory is allocated for cache and all the configuration infrastructure for DNS is not initialised, hence /etc/hosts doesn't get read.

It would be trivial to remove half a dozen "if (port != 0) { }" lines from the code, and have all of the DNS stuff still live apart from actually listening on port 53, but that's not necessarily an improvement. There's not increase in functionality, since the same behaviour can be configured simply by adding the the addresses to the dhcp-host lines and that works with the existing code even when port=0 is set.


My feeling is that the best fix to this is a heads-up in the man page, but I'm happy to entertain arguments to the contrary.

I believe that /etc/hosts is generic database which is used for name<->IP mapping wherever it's needed. This should imho include static DHCP configuration.

I also believe that the resources part is not important nowadays.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Micro\ random number generator: 0, 0, 0, 4.33e+67, 0, 0, 0...

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to