diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-02 15:14:19 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-02 15:14:19 +0000 |
commit | cf0edeb3d17171c662c0de06a9eb1ddea4597150 (patch) | |
tree | ffcb415a4ffac3bf2f472059483b40e92fac3bc7 /package/network/services/dnsmasq | |
parent | 3e5b47f19568777de64e56bc48ee9c950a1067b6 (diff) |
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')
-rw-r--r-- | package/network/services/dnsmasq/Makefile | 4 | ||||
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index d92b00f99..26670e5d5 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -1,5 +1,5 @@ # -# 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 diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 85c22c374..f2e111bed 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 |