Skip to content
Snippets Groups Projects
Commit 54c0b404 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

dnsmasq: allow dhcp host entries without mac addresses (#11928)

SVN-Revision: 34971
parent c8a8f8fd
No related branches found
No related tags found
No related merge requests found
#
# Copyright (C) 2006-2012 OpenWrt.org
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.62
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment