Skip to content
Snippets Groups Projects
Select Git revision
  • 4249d65af73ee9228d827af913b7caf2aac00809
  • 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 814 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(k)
    	need_alphanumeric_key(k)
    
    	need_string_match(in_domain(extend(k, {'key'})), '^%x+$')
    	need_string_array(in_domain(extend(k, {'remotes'})))
    end
    
    local function check_group(k)
    	need_alphanumeric_key(k)
    
    	need_number(extend(k, {'limit'}), false)
    	need_table(extend(k, {'peers'}), check_peer, false)
    	need_table(extend(k, {'groups'}), check_group, false)
    end
    
    need_table({'mesh_vpn', 'fastd', 'groups'}, check_group)