Skip to content
Snippets Groups Projects
Select Git revision
  • 50812b162ca0bb6296db05838335e0e0cf2d0f79
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
41 results

check_site.lua

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    check_site.lua 990 B
    local fastd_methods = {'salsa2012+gmac', 'salsa2012+umac', 'null+salsa2012+gmac', 'null+salsa2012+umac', 'null'}
    need_array_of('mesh_vpn.fastd.methods', fastd_methods)
    need_boolean(in_site('mesh_vpn.fastd.configurable'), false)
    
    need_one_of(in_site('mesh_vpn.fastd.syslog_level'), {'error', 'warn', 'info', 'verbose', 'debug', 'debug2'}, false)
    
    local function check_peer(prefix)
    	return function(k, _)
    		assert_uci_name(k)
    
    		local table = string.format('%s[%q].', prefix, k)
    
    		need_string_match(in_domain(table .. 'key'), '^%x+$')
    		need_string_array(in_domain(table .. 'remotes'))
    	end
    end
    
    local function check_group(prefix)
    	return function(k, _)
    		assert_uci_name(k)
    
    		local table = string.format('%s[%q].', prefix, k)
    
    		need_number(table .. 'limit', false)
    		need_table(table .. 'peers', check_peer(table .. 'peers'), false)
    		need_table(table .. 'groups', check_group(table .. 'groups'), false)
    	end
    end
    
    need_table('mesh_vpn.fastd.groups', check_group('mesh_vpn.fastd.groups'))