|
@@ -51,7 +51,8 @@ local function load_state()
|
|
|
elseif t == "ssid" then ssid_enabled[v] = true
|
|
elseif t == "ssid" then ssid_enabled[v] = true
|
|
|
elseif t == "dhcp" then
|
|
elseif t == "dhcp" then
|
|
|
local mac, ip = v:match("^(.+)->(.+)$")
|
|
local mac, ip = v:match("^(.+)->(.+)$")
|
|
|
- if mac and ip then dhcp[mac] = {ip=ip, mac=mac} end
|
|
|
|
|
|
|
+ -- Validate MAC for DHCP too
|
|
|
|
|
+ if mac and ip and is_valid_mac(mac) then dhcp[mac] = {ip=ip, mac=mac} end
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
return { clients = clients, ssid_enabled = ssid_enabled, dhcp = dhcp }
|
|
return { clients = clients, ssid_enabled = ssid_enabled, dhcp = dhcp }
|