From 37478505352048f07f408c3fabc174520fb5a238 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 23 Mar 2012 11:19:56 +0000 Subject: 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 SVN-Revision: 31056 --- package/dnsmasq/files/dnsmasq.init | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'package/dnsmasq') 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" } -- cgit v1.1