From: Rui Salvaterra Date: Mon, 13 Dec 2021 15:00:17 +0000 (+0000) Subject: dnsmasq: add a new "dnsfilter" configuration option X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=29c712c60a09ae41c2237ae5d953c63b9bef07e5;p=openwrt%2Fstaging%2Fjow.git dnsmasq: add a new "dnsfilter" configuration option Add UCI support for record filtering in dnsmasq replies. The new "dnsfilter" option can take either "A" or "AAAA" as possible values, enabling filtering of IPv4 or IPv6 addresses, respectively. Signed-off-by: Rui Salvaterra --- diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index bb75fa31ed..d20217ff7a 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -994,6 +994,13 @@ dnsmasq_start() ;; esac + config_get dnsfilter "$cfg" "dnsfilter" + case "$dnsfilter" in + A|AAAA) + xappend "--filter-$dnsfilter" + ;; + esac + append_bool "$cfg" fqdn "--dhcp-fqdn" append_bool "$cfg" proxydnssec "--proxy-dnssec" append_bool "$cfg" localservice "--local-service"