summaryrefslogtreecommitdiff
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
commit37478505352048f07f408c3fabc174520fb5a238 (patch)
treeba3d64aeee17a5ee7415136e15ad3c25912e0a93 /package/dnsmasq
parentf35b9a9a4cfa0b9f81201988a7921911e922eabb (diff)
downloadmtk-20170518-37478505352048f07f408c3fabc174520fb5a238.zip
mtk-20170518-37478505352048f07f408c3fabc174520fb5a238.tar.gz
mtk-20170518-37478505352048f07f408c3fabc174520fb5a238.tar.bz2
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> SVN-Revision: 31056
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 b0c2cd2..13f1783 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"
}