mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
dnsmasq: fix dhcp-host entries with empty macs
This commit is contained in:
parent
c08dca36aa
commit
72c6b996b0
@ -277,7 +277,7 @@ dhcp_match_add() {
|
|||||||
|
|
||||||
dhcp_host_add() {
|
dhcp_host_add() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local hosttag nametime addrs duids
|
local hosttag nametime addrs duids macs tags
|
||||||
|
|
||||||
config_get_bool force "$cfg" force 0
|
config_get_bool force "$cfg" force 0
|
||||||
|
|
||||||
@ -305,7 +305,6 @@ dhcp_host_add() {
|
|||||||
if [ -n "$mac" ]; then
|
if [ -n "$mac" ]; then
|
||||||
# --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap
|
# --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap
|
||||||
# many MAC are possible to track a laptop ON/OFF dock
|
# many MAC are possible to track a laptop ON/OFF dock
|
||||||
macs=""
|
|
||||||
for m in $mac; do append macs "$m" ","; done
|
for m in $mac; do append macs "$m" ","; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -326,7 +325,6 @@ dhcp_host_add() {
|
|||||||
hex_to_hostid hostid "$hostid"
|
hex_to_hostid hostid "$hostid"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tags=""
|
|
||||||
if [ -n "$tag" ]; then
|
if [ -n "$tag" ]; then
|
||||||
for t in $tag; do append tags "$t" ",set:"; done
|
for t in $tag; do append tags "$t" ",set:"; done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user