check_site.lua 535 B

123456789101112131415
  1. need_string_match(in_domain({'next_node', 'mac'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$', false)
  2. if need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) then
  3. need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$')
  4. end
  5. need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false)
  6. for _, config in ipairs({'wifi24', 'wifi5'}) do
  7. if need_table({config}, nil, false) then
  8. need_string(in_domain({config, 'ap', 'ssid'}))
  9. need_boolean({config, 'ap', 'disabled'}, false)
  10. end
  11. end