diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-01-02 15:14:19 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-01-02 15:14:19 +0000 |
commit | 64324ccfcaa11fb23cc43158186c13e4e6e9ee17 (patch) | |
tree | ffcb415a4ffac3bf2f472059483b40e92fac3bc7 /package/network/services/dnsmasq/files/dnsmasq.init | |
parent | 090f7dbbad6609d61f7edfe3cc0c8dbbfbf55497 (diff) | |
download | master-187ad058-64324ccfcaa11fb23cc43158186c13e4e6e9ee17.tar.gz master-187ad058-64324ccfcaa11fb23cc43158186c13e4e6e9ee17.tar.bz2 master-187ad058-64324ccfcaa11fb23cc43158186c13e4e6e9ee17.zip |
dnsmasq: allow dhcp host entries without mac addresses (#11928)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34971 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/dnsmasq/files/dnsmasq.init')
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 85c22c3745..f2e111bed5 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -253,10 +253,15 @@ dhcp_host_add() { config_get ip "$cfg" ip [ -n "$ip" -o -n "$name" ] || return 0 - macs="" config_get mac "$cfg" mac + [ -z "$mac" ] && { + [ -n "$name" ] || return 0 + mac="$name" + name="" + } + + macs="" for m in $mac; do append macs "$m" ","; done - [ -n "$macs" ] || return 0 config_get tag "$cfg" tag |