gluon-mesh-vpn-fastd: make fastd syslog level configurable (#915)

This commit is contained in:
viisauksena 2016-11-06 00:01:49 +01:00 committed by Matthias Schiffer
parent b707840949
commit 539081d315
4 changed files with 7 additions and 2 deletions

View File

@ -102,6 +102,7 @@
methods = {'salsa2012+umac'},
-- enabled = true,
-- configurable = true,
-- syslog_level = 'warn',
mtu = 1280,
groups = {

View File

@ -182,12 +182,15 @@ fastd_mesh_vpn
In any case, the ``null`` method should always be the first method in the list
if it is supported at all. You should only set `configurable` to `true` if the
configured peers support both the ``null`` method and methods with encryption.
You can set syslog_level from verbose (default) to warn to reduce syslog output.
::
fastd_mesh_vpn = {
methods = {'salsa2012+umac'},
-- enabled = true,
-- configurable = true,
-- syslog_level = 'warn',
mtu = 1280,
groups = {
backbone = {

View File

@ -3,6 +3,7 @@ need_number('fastd_mesh_vpn.mtu')
need_boolean('fastd_mesh_vpn.enabled', false)
need_boolean('fastd_mesh_vpn.configurable', false)
need_one_of('fastd_mesh_vpn.syslog_level', {'error', 'warn', 'info', 'verbose', 'debug', 'debug2'}, false)
local function check_peer(prefix)
return function(k, _)

View File

@ -20,6 +20,7 @@ if not enabled then
enabled = site.fastd_mesh_vpn.enabled and 1 or 0
end
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
local methods
@ -31,7 +32,6 @@ if site.fastd_mesh_vpn.configurable then
has_null = lutil.contains(old_methods, 'null')
end
methods = {}
if has_null then
table.insert(methods, 'null')
@ -52,7 +52,7 @@ uci:section('fastd', 'fastd', 'mesh_vpn',
{
enabled = enabled,
group = 'gluon-fastd',
syslog_level = 'verbose',
syslog_level = syslog_level,
interface = 'mesh-vpn',
mode = 'tap',
mtu = site.fastd_mesh_vpn.mtu,