|
@@ -46,7 +46,8 @@ local function load_state()
|
|
|
local t, v = line:match("^([^:]+):(.+)$")
|
|
local t, v = line:match("^([^:]+):(.+)$")
|
|
|
if t == "client" then
|
|
if t == "client" then
|
|
|
local mac, iface, ssid = v:match("^(.+)|(.+)|(.+)$")
|
|
local mac, iface, ssid = v:match("^(.+)|(.+)|(.+)$")
|
|
|
- if mac and iface then clients[mac] = {iface=iface, ssid=ssid} end
|
|
|
|
|
|
|
+ -- Validate MAC when loading from state
|
|
|
|
|
+ if mac and iface and is_valid_mac(mac) then clients[mac] = {iface=iface, ssid=ssid} end
|
|
|
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("^(.+)->(.+)$")
|