From 29c712c60a09ae41c2237ae5d953c63b9bef07e5 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 13 Dec 2021 15:00:17 +0000 Subject: [PATCH] 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 --- package/network/services/dnsmasq/files/dnsmasq.init | 7 +++++++ 1 file changed, 7 insertions(+) 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" -- 2.30.2