From 558e98ae42d188cdfc8fa720249a45c22e183a42 Mon Sep 17 00:00:00 2001 From: kb-light Date: Sun, 29 Jan 2017 11:51:29 +0100 Subject: [PATCH] gluon-mesh-vpn-fastd: improve check_site --- package/gluon-mesh-vpn-fastd/check_site.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/gluon-mesh-vpn-fastd/check_site.lua b/package/gluon-mesh-vpn-fastd/check_site.lua index c1bf0ea1..c8370a56 100644 --- a/package/gluon-mesh-vpn-fastd/check_site.lua +++ b/package/gluon-mesh-vpn-fastd/check_site.lua @@ -1,4 +1,5 @@ -need_string_array('fastd_mesh_vpn.methods') +local fastd_methods = {'salsa2012+gmac', 'salsa2012+umac', 'null+salsa2012+gmac', 'null+salsa2012+umac', 'null'} +need_array_of('fastd_mesh_vpn.methods', fastd_methods) need_number('fastd_mesh_vpn.mtu') need_boolean('fastd_mesh_vpn.enabled', false) need_boolean('fastd_mesh_vpn.configurable', false) @@ -11,7 +12,7 @@ local function check_peer(prefix) local table = string.format('%s[%q].', prefix, k) - need_string(table .. 'key') + need_string_match(table .. 'key', '^%x+$') need_string_array(table .. 'remotes') end end