aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Minqiang <ptpt52@gmail.com>2022-11-07 16:20:15 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2022-11-12 17:05:13 +0100
commit4979d16fb198c02a6f28a215c8827f98726824df (patch)
treeccffa11e53226a593e4d603641f058c33e2df19f
parent6830fb37cb3a03317f567f12a869ea91fcfa4a80 (diff)
downloadupstream-4979d16fb198c02a6f28a215c8827f98726824df.tar.gz
upstream-4979d16fb198c02a6f28a215c8827f98726824df.tar.bz2
upstream-4979d16fb198c02a6f28a215c8827f98726824df.zip
dnsmasq: add support for filter-AAAA/A
This add --filter-A and --filter-AAAA options, to remove IPv4 or IPv6 addresses from DNS answers. these options is supported since version 2.87. Co-authored-by: NueXini <nuexini@alumni.tongji.edu.cn> Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
-rw-r--r--package/network/services/dnsmasq/files/dhcp.conf2
-rwxr-xr-xpackage/network/services/dnsmasq/files/dnsmasq.init3
2 files changed, 5 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf
index 8c42ef782e..4ddef172e6 100644
--- a/package/network/services/dnsmasq/files/dhcp.conf
+++ b/package/network/services/dnsmasq/files/dhcp.conf
@@ -21,6 +21,8 @@ config dnsmasq
#list bogusnxdomain '64.94.110.11'
option localservice 1 # disable to allow DNS requests from non-local subnets
option ednspacket_max 1232
+ option filter_aaaa 0
+ option filter_a 0
config dhcp lan
option interface lan
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 386b47616e..21910f5fd1 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -960,6 +960,9 @@ dnsmasq_start()
append_bool "$cfg" rapidcommit "--dhcp-rapid-commit"
append_bool "$cfg" scriptarp "--script-arp"
+ append_bool "$cfg" filter_aaaa "--filter-AAAA"
+ append_bool "$cfg" filter_a "--filter-A"
+
append_parm "$cfg" logfacility "--log-facility"
config_get logfacility "$cfg" "logfacility"
append_parm "$cfg" cachesize "--cache-size"