aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq
diff options
context:
space:
mode:
authorPeter Denison <openwrt@marshadder.org>2010-05-08 12:35:29 +0000
committerPeter Denison <openwrt@marshadder.org>2010-05-08 12:35:29 +0000
commitc33f8778307d31045b66480fbf6e896c79a7fbfc (patch)
tree39df351f6e0998c7dd9d61d1c653643ead827a9a /package/dnsmasq
parent5064ee8c3676310ed5950eda9e1fa4c79f9e9e52 (diff)
downloadupstream-c33f8778307d31045b66480fbf6e896c79a7fbfc.tar.gz
upstream-c33f8778307d31045b66480fbf6e896c79a7fbfc.tar.bz2
upstream-c33f8778307d31045b66480fbf6e896c79a7fbfc.zip
Add support for SRV records to dnsmasq config parsing
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21400 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq')
-rw-r--r--package/dnsmasq/files/dnsmasq.init18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 15f856d4e5..9bf89fa6df 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -310,6 +310,23 @@ dhcp_domain_add() {
done
}
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+
+ local service="$srv,$target"
+ [ -n "$port" ] && service="$service,$port"
+
+ append args "-W $service"
+}
+
start() {
include /lib/network
scan_interfaces
@@ -326,6 +343,7 @@ start() {
config_foreach dhcp_remoteid_add remoteid
config_foreach dhcp_subscrid_add subscrid
config_foreach dhcp_domain_add domain
+ config_foreach dhcp_srv_add srvhost
config_foreach dhcp_add dhcp
/usr/sbin/dnsmasq $args && {