gluon/package/gluon-client-bridge/check_site.lua
lemoer d571f6054b check_site: introduce in_site_or_domain() stub
This does not change any behaviour. It's just a preparatory step to
make things more clear in the following commits.
2021-08-15 16:38:59 +02:00

22 lines
997 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(in_site_or_domain({config, 'ap'}), nil, false) then
need_boolean(in_site_or_domain({config, 'ap', 'disabled'}), false)
if need_boolean(in_site_or_domain({config, 'ap', 'owe_transition_mode'}), false) then
need_string_match(in_domain({config, 'ap', 'ssid'}), '^' .. ('.?'):rep(32) .. '$')
need_string_match(in_domain({config, 'ap', 'owe_ssid'}), '^' .. ('.?'):rep(32) .. '$')
else
need_string_match(in_domain({config, 'ap', 'ssid'}), '^' .. ('.?'):rep(32) .. '$', false)
need_string_match(in_domain({config, 'ap', 'owe_ssid'}), '^' .. ('.?'):rep(32) .. '$', false)
end
end
end