gluon-mesh-vpn-fastd: make fastd syslog level configurable (#915)
This commit is contained in:
parent
b707840949
commit
539081d315
@ -102,6 +102,7 @@
|
|||||||
methods = {'salsa2012+umac'},
|
methods = {'salsa2012+umac'},
|
||||||
-- enabled = true,
|
-- enabled = true,
|
||||||
-- configurable = true,
|
-- configurable = true,
|
||||||
|
-- syslog_level = 'warn',
|
||||||
|
|
||||||
mtu = 1280,
|
mtu = 1280,
|
||||||
groups = {
|
groups = {
|
||||||
|
@ -182,12 +182,15 @@ fastd_mesh_vpn
|
|||||||
In any case, the ``null`` method should always be the first method in the list
|
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
|
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.
|
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 = {
|
fastd_mesh_vpn = {
|
||||||
methods = {'salsa2012+umac'},
|
methods = {'salsa2012+umac'},
|
||||||
-- enabled = true,
|
-- enabled = true,
|
||||||
-- configurable = true,
|
-- configurable = true,
|
||||||
|
-- syslog_level = 'warn',
|
||||||
mtu = 1280,
|
mtu = 1280,
|
||||||
groups = {
|
groups = {
|
||||||
backbone = {
|
backbone = {
|
||||||
|
@ -3,6 +3,7 @@ need_number('fastd_mesh_vpn.mtu')
|
|||||||
need_boolean('fastd_mesh_vpn.enabled', false)
|
need_boolean('fastd_mesh_vpn.enabled', false)
|
||||||
need_boolean('fastd_mesh_vpn.configurable', 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)
|
local function check_peer(prefix)
|
||||||
return function(k, _)
|
return function(k, _)
|
||||||
|
@ -20,6 +20,7 @@ if not enabled then
|
|||||||
enabled = site.fastd_mesh_vpn.enabled and 1 or 0
|
enabled = site.fastd_mesh_vpn.enabled and 1 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
|
||||||
|
|
||||||
local methods
|
local methods
|
||||||
|
|
||||||
@ -31,7 +32,6 @@ if site.fastd_mesh_vpn.configurable then
|
|||||||
has_null = lutil.contains(old_methods, 'null')
|
has_null = lutil.contains(old_methods, 'null')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
methods = {}
|
methods = {}
|
||||||
if has_null then
|
if has_null then
|
||||||
table.insert(methods, 'null')
|
table.insert(methods, 'null')
|
||||||
@ -52,7 +52,7 @@ uci:section('fastd', 'fastd', 'mesh_vpn',
|
|||||||
{
|
{
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
group = 'gluon-fastd',
|
group = 'gluon-fastd',
|
||||||
syslog_level = 'verbose',
|
syslog_level = syslog_level,
|
||||||
interface = 'mesh-vpn',
|
interface = 'mesh-vpn',
|
||||||
mode = 'tap',
|
mode = 'tap',
|
||||||
mtu = site.fastd_mesh_vpn.mtu,
|
mtu = site.fastd_mesh_vpn.mtu,
|
||||||
|
Loading…
Reference in New Issue
Block a user