aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq
diff options
context:
space:
mode:
authorDaniel Danzberger <daniel@dd-wrt.com>2017-05-02 17:05:07 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-05-09 10:00:49 +0200
commiteb99f8912ad7c827c876b1a64e9f347c2cbaf7af (patch)
treefb2fa9242f4ffc66603483bf9e6a040c09acee2e /package/network/services/dnsmasq
parent4c3953ba291abfb1d28b1452b6e519367bf4f242 (diff)
downloadupstream-eb99f8912ad7c827c876b1a64e9f347c2cbaf7af.tar.gz
upstream-eb99f8912ad7c827c876b1a64e9f347c2cbaf7af.tar.bz2
upstream-eb99f8912ad7c827c876b1a64e9f347c2cbaf7af.zip
dnsmasq: add interface-name uci list.
This patch adds the interface-name option for each dhcp config in /etc/config/dhcp. With the interface_name option users can define a DNS name for each dhcp section that will be resolved by dnsmasq with the underlaying interface address. For example: config dhcp 'lan' option interface 'lan' ... list interface_name 'home.lan' ... Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
Diffstat (limited to 'package/network/services/dnsmasq')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init6
2 files changed, 7 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index e8d8e8583c..113a6f154d 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.77test5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/test-releases
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 3b801303b5..c742205321 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -142,6 +142,10 @@ append_pxe_service() {
xappend "--pxe-service=$1"
}
+append_interface_name() {
+ xappend "--interface-name=$1,$2"
+}
+
filter_dnsmasq() {
local cfg="$1" func="$2" match_cfg="$3" found_cfg
@@ -467,6 +471,8 @@ dhcp_add() {
config_get ra_management "$cfg" ra_management
config_get ra_preference "$cfg" ra_preference
+ config_list_foreach "$cfg" "interface_name" append_interface_name "$ifname"
+
# Put the router host name on this DHCP served interface address(es)
dhcp_this_host_add "$net" "$ifname" "$ADD_LOCAL_FQDN"