openwrt/package/network/services/dnsmasq/files
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
..
50-dnsmasq-migrate-ipset.sh dnsmasq: add uci-defaults script for ipset migration 2022-11-06 19:47:13 +00:00
50-dnsmasq-migrate-resolv-conf-auto.sh dnsmasq: fix uci-defaults script to exit 0 so it is cleaned up 2020-02-19 22:02:59 +01:00
dhcp-script.sh dnsmasq: pass environment variables to hotplug 2024-12-12 11:00:38 +01:00
dhcp.conf dnsmasq: set an increased cachesize default value 2023-01-21 11:13:44 +01:00
dhcpbogushostname.conf dnsmasq: add dhcp-ignore-names support - CERT VU#598349 2018-10-09 09:45:16 +01:00
dnsmasq.conf packages: sort network related packages into package/network/ 2012-10-10 12:32:29 +00:00
dnsmasq.init dnsmasq: prevent upstream resolution of addresses 2025-11-07 15:23:25 +01:00
dnsmasq_acl.json dnsmasq: add ubus acl to allow calls to hotplug.tftp object 2021-11-12 15:02:58 +00:00
dnsmasqsec.hotplug dnsmasq: switch to ubus-based hotplug call 2021-02-08 00:57:14 +00:00
rfc6761.conf dnsmasq: remove example domains from rfc6761.conf (FS#1447) 2018-04-09 17:35:17 +02:00