diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-08 23:28:55 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-08 23:28:55 +0000 |
commit | 58820edbd94b02cc21aefff5e5c259ed5be60185 (patch) | |
tree | 3d5ff7b3d5ec2851c7cbb9dbb20c534a3556624b /package/dnsmasq | |
parent | 32885a5a05fd7b94192098a7f1fec273b80ad7b3 (diff) | |
download | mtk-20170518-58820edbd94b02cc21aefff5e5c259ed5be60185.zip mtk-20170518-58820edbd94b02cc21aefff5e5c259ed5be60185.tar.gz mtk-20170518-58820edbd94b02cc21aefff5e5c259ed5be60185.tar.bz2 |
dnsmasq: allow multiple macs per static lease address (#6205)
SVN-Revision: 20074
Diffstat (limited to 'package/dnsmasq')
-rw-r--r-- | package/dnsmasq/files/dnsmasq.init | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index 0c038b7..4f8ff9d 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() { |