aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-03-08 23:28:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-03-08 23:28:55 +0000
commit7fc98fcb86ea991074a57afa1de5dce05f34812a (patch)
tree1b13cb50069d54da8db647a36f3b086a0e8fbbfd /package/dnsmasq
parent5d90504c419192efde861a4b7fb3ad029815d70c (diff)
downloadmaster-187ad058-7fc98fcb86ea991074a57afa1de5dce05f34812a.tar.gz
master-187ad058-7fc98fcb86ea991074a57afa1de5dce05f34812a.tar.bz2
master-187ad058-7fc98fcb86ea991074a57afa1de5dce05f34812a.zip
[package] dnsmasq: allow multiple macs per static lease address (#6205)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20074 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq')
-rw-r--r--package/dnsmasq/files/dnsmasq.init11
1 files changed, 8 insertions, 3 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 0c038b7d31..4f8ff9d0f8 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -176,13 +176,18 @@ dhcp_host_add() {
config_get networkid "$cfg" networkid
[ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid"
- config_get mac "$cfg" mac
- [ -n "$mac" ] || return 0
+ config_get macs "$cfg" mac
+ [ -n "$macs" ] || return 0
config_get ip "$cfg" ip
[ -n "$ip" ] || return 0
- append args "--dhcp-host=$mac,${networkid:+net:$networkid,}$ip${name:+,$name}"
+ 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}"
}
dhcp_mac_add() {