Skip to content
Snippets Groups Projects
Select Git revision
  • bf5524915937f1511bc213d380698d801f4c5b73
  • v2018.2.x default protected
  • 0x4A6F-rpi4
  • 0x4A6F-master
  • master
  • v2018.2.2-ffs
  • v2016.2.4-batmanbug
  • radv-filterd
  • v2016.2.x
  • hoodselector
  • v2016.1.x
  • babel
  • v2015.1.x
  • 2014.4.x
  • 2014.3.x
  • v2018.2.2-ffs0.1
  • v2018.2.1-ffs0.1
  • v2018.2.1
  • v2018.2-ffs0.1
  • v2018.2
  • v2018.1.4
  • v2018.1.3
  • v2018.1.2
  • v2018.1.1
  • v2018.1
  • v2017.1.8
  • v2017.1.7
  • v2017.1.6
  • v2017.1.5
  • v2017.1.4
  • v2017.1.3
  • v2017.1.2
  • v2016.2.7
  • v2017.1.1
  • v2017.1
35 results

check_site.lua

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    • Martin Weinelt's avatar
      bf552491
      gluon-core: add outdoor support for 5 ghz radios · bf552491
      Martin Weinelt authored
      Add the `wifi5.outdoor_chanlist` site configuration that
      allows specifying an outdoor channel range that can be
      switched to for regulatory compliance.
      
      Upon enabling the outdoor option the device will
       - configure the `outdoor_chanlist` on all 5 GHz radios
       - which may enable DFS/TPC, based on the regulatory domain
       - disable ibss/mesh on the 5 GHz radio, as DFS *will*
         break mesh connections
       - allow for htmode reconfiguration on 5 GHz radios
      
      The outdoor option can be toggled from
       - Advanced Settings
         - W-LAN
           - Outdoor Installation
      
      The `preserve_channel` flag overrules the outdoor channel
      selection.
      bf552491
      History
      gluon-core: add outdoor support for 5 ghz radios
      Martin Weinelt authored
      Add the `wifi5.outdoor_chanlist` site configuration that
      allows specifying an outdoor channel range that can be
      switched to for regulatory compliance.
      
      Upon enabling the outdoor option the device will
       - configure the `outdoor_chanlist` on all 5 GHz radios
       - which may enable DFS/TPC, based on the regulatory domain
       - disable ibss/mesh on the 5 GHz radio, as DFS *will*
         break mesh connections
       - allow for htmode reconfiguration on 5 GHz radios
      
      The outdoor option can be toggled from
       - Advanced Settings
         - W-LAN
           - Outdoor Installation
      
      The `preserve_channel` flag overrules the outdoor channel
      selection.
    check_site.lua 2.63 KiB
    need_string(in_site({'site_code'}))
    need_string(in_site({'site_name'}))
    
    -- this_domain() returns nil when multidomain support is disabled
    if this_domain() then
    	need_domain_name(in_site({'default_domain'}))
    
    	need_table(in_domain({'domain_names'}), function(domain)
    		need_alphanumeric_key(domain)
    		need_string(domain)
    	end)
    	need_string(in_domain({'domain_names', this_domain()}))
    end
    
    need_string_match(in_domain({'domain_seed'}), '^' .. ('%x'):rep(64) .. '$')
    
    need_string({'opkg', 'openwrt'}, false)
    obsolete({'opkg', 'lede'}, 'Use opkg.openwrt instead.')
    need_table({'opkg', 'extra'}, function(extra_repo)
    	need_alphanumeric_key(extra_repo)
    	need_string(extra_repo)
    end, false)
    
    need_string(in_site({'hostname_prefix'}), false)
    need_string(in_site({'timezone'}))
    
    need_string_array({'ntp_servers'}, false)
    
    need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$')
    
    local supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}
    for _, config in ipairs({'wifi24', 'wifi5'}) do
    	if need_table({config}, nil, false) then
    		need_string(in_site({'regdom'})) -- regdom is only required when wifi24 or wifi5 is configured
    
    		need_number({config, 'channel'})
    		if config == 'wifi5' then
    			need_string_match({config, 'outdoor_chanlist'}, '^[%d%s-]+$', false)
    		end
    
    		obsolete({config, 'supported_rates'}, '802.11b rates are disabled by default.')
    		obsolete({config, 'basic_rate'}, '802.11b rates are disabled by default.')
    
    		if need_table({config, 'ibss'}, nil, false) then
    			need_string_match(in_domain({config, 'ibss', 'ssid'}), '^' .. ('.?'):rep(32) .. '$')
    			need_string_match(in_domain({config, 'ibss', 'bssid'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
    			need_one_of({config, 'ibss', 'mcast_rate'}, supported_rates, false)
    			need_number({config, 'ibss', 'vlan'}, false)
    			need_boolean({config, 'ibss', 'disabled'}, false)
    		end
    
    		if need_table({config, 'mesh'}, nil, false) then
    			need_string_match(in_domain({config, 'mesh', 'id'}), '^' .. ('.?'):rep(32) .. '$')
    			need_one_of({config, 'mesh', 'mcast_rate'}, supported_rates, false)
    			need_boolean({config, 'mesh', 'disabled'}, false)
    		end
    	end
    end
    
    need_boolean(in_site({'poe_passthrough'}), false)
    
    if need_table({'dns'}, nil, false) then
    	need_string_array_match({'dns', 'servers'}, '^[%x:]+$')
    end
    
    need_string_array(in_domain({'next_node', 'name'}), false)
    need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false)
    need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false)
    
    need_boolean(in_domain({'mesh', 'vxlan'}), false)