Dnsmasq confusion

From OpenWrt Project documentation:
https://openwrt.org/docs/guide-user/base-system/dhcp.dnsmasq#etchosts

In /etc/hosts DNS entries are configured. dnsmasq will utilize these entries to answer DNS queries on your network.

Format:

[IP_address] host_name host_name_short ...

Example:

192.168.1.1 router OpenWrt localhost
192.168.1.2 debian-server
192.168.1.3 ubuntu-laptop

I realized in my configuration (I am using default) dnsmasq is looking in /tmp/hosts/dhcp.cfg0* for answering DNS queries on my lan and not /etc/hosts.

I am using openwrt 18.06.01
Is this normal behavior not reflected in docs?

Please confirm these entries are on multiple lines.

Yes, of course, it is only a formatting glitch.
It is supposed to be a blockquote, a direct copy from Openwrt Project documentation.
https://openwrt.org/docs/guide-user/base-system/dhcp.dnsmasq

1 Like

That behaviour is the (expected) internal method used by uci to build configuration files on the fly, mixing the (parsed) contents of /etc/config and /etc.