aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-03-23 11:19:56 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-03-23 11:19:56 +0000
commit6a9ca25f3037a8fa9c530760482f964cda5e5729 (patch)
treedf2fbdbae66133bf3ab0506991d0064304b5e731 /package/dnsmasq
parentea1c8334d911844321be0b4c4eb38afd0b79abd2 (diff)
downloadupstream-6a9ca25f3037a8fa9c530760482f964cda5e5729.tar.gz
upstream-6a9ca25f3037a8fa9c530760482f964cda5e5729.tar.bz2
upstream-6a9ca25f3037a8fa9c530760482f964cda5e5729.zip
dnsmasq: add keywords for SRV RR class/weight
The SRV record also requires the class and weight fields... Currently you can overload the "port" keyword as: option port xxxx,class,weight but this is counter-intuitive. Here we fix this. Redux: make the port required. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31056 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq')
-rw-r--r--package/dnsmasq/files/dnsmasq.init7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index b0c2cd226f..13f178384a 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -360,9 +360,12 @@ dhcp_srv_add() {
[ -n "$target" ] || return 0
config_get port "$cfg" port
+ [ -n "$port" ] || return 0
- local service="$srv,$target"
- [ -n "$port" ] && service="$service,$port"
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
append args "-W $service"
}