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

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 20 12:57:16 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/137ac21596bb68e15e71800d8a8203cace7c9a37

commit 137ac21596bb68e15e71800d8a8203cace7c9a37
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Mar 27 00:44:05 2024 +0100

    dnsmasq: add handling of `cache-rr` to init script
    
    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 at gmail.com>
    Tested-by: Vladimir Kochkovski <ask at getvladimir.com>
    Link: https://github.com/openwrt/openwrt/pull/14975
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index dc5d9a17c2..7ef4df3ba6 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"




More information about the lede-commits mailing list