Ticket #13249: dnsmasq_uci.patch

File dnsmasq_uci.patch, 1.5 KB (added by anonymous, 2 years ago)

Dnsmasq UCI additions for txt-record, ptr-record and listen-address

  • package/network/services/dnsmasq/files/dnsmasq.init

    commit d73a0ad27e91857335ecf2173b0cdddab00a2506
    
        Modify dnsmasq UCI configuration options
        
        Adds 3 options that can now be configured via UCI in /etc/config/dhp
        
           txtrecord   which adds a txt-record
           ptrrecord   which adds a ptr-record
           listenaddress   which add a listen-address
        
        Something like this was requested, but not yet added
        
            https://dev.openwrt.org/ticket/13249
    
    diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
    index db342e7..60be19d 100644
    a b append_parm() { 
    7878        xappend "$switch=$_loctmp" 
    7979} 
    8080 
     81append_listenaddress() { 
     82        xappend "--listen-address=$1" 
     83} 
     84 
     85append_ptrrecord() { 
     86        xappend "--ptr-record=$1" 
     87} 
     88 
     89append_txtrecord() { 
     90        xappend "--txt-record=$1" 
     91} 
     92 
    8193append_server() { 
    8294        xappend "--server=$1" 
    8395} 
    dnsmasq() { 
    156168        config_list_foreach "$cfg" "notinterface" append_notinterface 
    157169        config_list_foreach "$cfg" "addnhosts" append_addnhosts 
    158170        config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain 
     171        config_list_foreach "$cfg" "txtrecord" append_txtrecord 
     172        config_list_foreach "$cfg" "ptrrecord" append_ptrrecord 
     173        config_list_foreach "$cfg" "listenaddress" append_listenaddress 
    159174        append_parm "$cfg" "leasefile" "--dhcp-leasefile" 
    160175        append_parm "$cfg" "resolvfile" "--resolv-file" 
    161176        append_parm "$cfg" "serversfile" "--servers-file"