Skip to content

Commit

Permalink
dnsmasq: fix dhcp-host entries with empty macs
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Dec 12, 2017
1 parent c08dca3 commit 72c6b99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions package/network/services/dnsmasq/files/dnsmasq.init
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ dhcp_match_add() {

dhcp_host_add() {
local cfg="$1"
local hosttag nametime addrs duids
local hosttag nametime addrs duids macs tags

config_get_bool force "$cfg" force 0

Expand Down Expand Up @@ -305,7 +305,6 @@ dhcp_host_add() {
if [ -n "$mac" ]; then
# --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap
# many MAC are possible to track a laptop ON/OFF dock
macs=""
for m in $mac; do append macs "$m" ","; done
fi

Expand All @@ -326,7 +325,6 @@ dhcp_host_add() {
hex_to_hostid hostid "$hostid"
fi

tags=""
if [ -n "$tag" ]; then
for t in $tag; do append tags "$t" ",set:"; done
fi
Expand Down

0 comments on commit 72c6b99

Please sign in to comment.