openwrt/package/network/services/dnsmasq
Marko Zajc 38753dea64
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
dnsmasq: prevent upstream resolution of addresses
`list address` entries in /etc/config/dhcp are sometimes (I'm not sure
about the exact conditions) passed to upstream resolver, bypassing local
resolution. Adding them (minus the IP) to --local prevents this. In the
configuration, this means that

    # /etc/config/dhcp
    list address '/hello.com/world.com/1.2.3.4'
    list address '/foo.com/bar.com/4.3.2.1'

which previously translated into

    # /var/etc/dnsmasq.conf.*
    address=/hello.com/world.com/1.2.3.4
    address=/foo.com/bar.com/4.3.2.1

now becomes

    # /var/etc/dnsmasq.conf.*
    address=/hello.com/world.com/1.2.3.4
    local=/hello.com/world.com/
    address=/foo.com/bar.com/4.3.2.1
    local=/foo.com/bar.com/

This behaviour is controlled by the `address_as_local` boolean option, which
defaults to false (old behaviour). openwrt/luci#7957 adds support for this flag
to LuCI.

A workaround for a small list of domains is to add them to `option local`,
but this is very tedious to do for every `list address` entry and dnsmasq
limits this option to 1024 characters.

Signed-off-by: Marko Zajc <marko@zajc.tel>
Link: https://github.com/openwrt/openwrt/pull/18610
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 15:23:25 +01:00
..
files dnsmasq: prevent upstream resolution of addresses 2025-11-07 15:23:25 +01:00
patches dnsmasq: bump release to 2.91 2025-04-13 21:29:46 +02:00
Makefile dnsmasq: fix start if dhcp-range is not correct 2025-05-29 23:54:18 +02:00