From: Jo-Philipp Wich Date: Mon, 8 Mar 2010 23:28:55 +0000 (+0000) Subject: dnsmasq: allow multiple macs per static lease address (#6205) X-Git-Tag: reboot~20750 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=58820edbd94b02cc21aefff5e5c259ed5be60185;p=openwrt%2Fstaging%2Fblogic.git dnsmasq: allow multiple macs per static lease address (#6205) SVN-Revision: 20074 --- diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 0c038b7d3101..4f8ff9d0f870 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() {