diff mbox series

[2/5] dnsmasq: add handling of `cache-rr` to init script

Message ID 20240402130919.58881-2-newtwen+github@gmail.com
State New
Headers show
Series [1/5] dnsmasq: add handling of `filter-rr` to init script | expand

Commit Message

Paul Donald April 2, 2024, 1:09 p.m. UTC
dnsmasq v2.90 introduced `--cache-rr=<rrtype>[,<rrtype>...]`.

uci config usage:

config dnsmasq
    ...
    option cache_rr 'AAAA,CNAME,NXDOMAIN,SRV,...'

The dnsmasq instance internally builds a linked list of RR to cache
from the individually supplied parameters, so it's allowed to provide
multiples:

... --cache-rr=AAAA --cache-rr=A ...

See https://forum.openwrt.org/t/resolving-query-type-65-to-local-address-for-ios-clients-in-dnsmasq/179504

Tested on: 23.05.2

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 15cf194673..9bb334f816 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -977,6 +977,7 @@  dnsmasq_start()
 	append_bool "$cfg" filter_aaaa "--filter-AAAA"
 	append_bool "$cfg" filter_a "--filter-A"
 	append_parm "$cfg" filter_rr "--filter-rr"
+	append_parm "$cfg" cache_rr "--cache-rr"
 
 	append_parm "$cfg" logfacility "--log-facility"
 	config_get logfacility "$cfg" "logfacility"