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 <phil...@redfish-solutions.com>


Index: package/dnsmasq/files/dnsmasq.init
===================================================================
--- package/dnsmasq/files/dnsmasq.init  (revision 30690)
+++ package/dnsmasq/files/dnsmasq.init  (working copy)
@@ -360,10 +360,13 @@
        [ -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"
 }
 
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to