gluon/package/gluon-client-bridge/check_site.lua
Matthias Schiffer 208cd4d98c
gluon-client-bridge: allow WLAN configs without ap section again
Fixes: 7ccdacd294 ("treewide: rework check_site_lib.lua")
2018-03-01 01:18:39 +01:00

16 lines
541 B
Lua

need_string_match(in_domain({'next_node', 'mac'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$', false)
if need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) then
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$')
end
need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false)
for _, config in ipairs({'wifi24', 'wifi5'}) do
if need_table({config, 'ap'}, nil, false) then
need_string(in_domain({config, 'ap', 'ssid'}))
need_boolean({config, 'ap', 'disabled'}, false)
end
end