aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2017-10-12 23:16:06 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-10-13 16:54:58 +0200
commit7ffb707576e8c635321275e9f118c8ad27d4c798 (patch)
tree367655ad4f6bef03a087bc53e06220af0c1dc32c /package/network/services
parent2cd32a3304cd52411da2dfac6db429efcad74ac8 (diff)
downloadupstream-7ffb707576e8c635321275e9f118c8ad27d4c798.tar.gz
upstream-7ffb707576e8c635321275e9f118c8ad27d4c798.tar.bz2
upstream-7ffb707576e8c635321275e9f118c8ad27d4c798.zip
dnsmasq: add listen_address parameter
This patch adds a parser for the uci representation of dnsmasq's "-a | --listen-address" option. In summary, this option forces dnsmasq to listen on the given IP address(es). Both interface and listen-address options may be given, in which case the set of both interfaces and addresses is used. Note that if no interface option is given, but listen_address is, dnsmasq will not automatically listen on the loopback interface. To achieve this, the loopback IP addresses, 127.0.0.1 and/or ::1 must be explicitly added. This option is useful for ujailed dnsmasq instances, that would otherwise fail to work properly, because listening to the "This host on this network" address (aka 0.0.0.0 see rfc1700 page 4) may not be allowed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (PKG_RELEASE increase)
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init5
2 files changed, 6 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index 9a024ceadf..7646fbd51a 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.78
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 0149643959..3d3d83334e 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -142,6 +142,10 @@ append_interface() {
xappend "--interface=$ifname"
}
+append_listenaddress() {
+ xappend "--listen-address=$1"
+}
+
append_notinterface() {
network_get_device ifname "$1" || ifname="$1"
xappend "--except-interface=$ifname"
@@ -835,6 +839,7 @@ dnsmasq_start()
append_parm "$cfg" "maxport" "--max-port"
append_parm "$cfg" "domain" "--domain"
append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "listen_address" append_listenaddress
config_list_foreach "$cfg" "server" append_server
config_list_foreach "$cfg" "rev_server" append_rev_server
config_list_foreach "$cfg" "address" append_address