aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.init7
1 files changed, 3 insertions, 4 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index cd5a78ae83..a0e893c5fd 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -206,20 +206,19 @@ dhcp_vendorclass_add() {
dhcp_host_add() {
local cfg="$1"
- config_get name "$cfg" name
-
config_get networkid "$cfg" networkid
[ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid"
+ config_get name "$cfg" name
config_get ip "$cfg" ip
- [ -n "$ip" ] || return 0
+ [ -n "$ip" ] || [ -n "$name" ] || return 0
macs=""
config_get mac "$cfg" mac
for m in $mac; do append macs "$m" ","; done
[ -n "$macs" ] || return 0
- append args "--dhcp-host=$macs,${networkid:+net:$networkid,}$ip${name:+,$name}"
+ append args "--dhcp-host=$macs${networkid:+,net:$networkid}${ip:+,$ip}${name:+,$name}"
}
dhcp_mac_add() {