dnsmasq: dnsmasq --rev-server support
authorDUPONCHEEL Sébastien <sebastien.duponcheel@corp.ovh.com>
Wed, 28 Jun 2017 15:07:39 +0000 (17:07 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 3 Jul 2017 20:08:21 +0000 (22:08 +0200)
This is functionally the same as --server, but provides some syntactic sugar to
make specifying address-to-name queries easier.

For example --rev-server=1.2.3.0/24,192.168.0.1 is exactly equivalent to
--server=/3.2.1.in-addr.arpa/192.168.0.1

Signed-off-by: DUPONCHEEL Sébastien <sebastien.duponcheel@corp.ovh.com>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init

index 11baff3..401071f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.77
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
index 065d1fd..19517d9 100644 (file)
@@ -125,6 +125,10 @@ append_server() {
        xappend "--server=$1"
 }
 
+append_rev_server() {
+        xappend "--rev-server=$1"
+}
+
 append_address() {
        xappend "--address=$1"
 }
@@ -823,6 +827,7 @@ dnsmasq_start()
        append_parm "$cfg" "domain" "--domain"
        append_parm "$cfg" "local" "--server"
        config_list_foreach "$cfg" "server" append_server
+       config_list_foreach "$cfg" "rev_server" append_rev_server
        config_list_foreach "$cfg" "address" append_address
        config_list_foreach "$cfg" "ipset" append_ipset
        config_list_foreach "$cfg" "interface" append_interface