summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/vpn-config.pl18
-rw-r--r--templates/vpn/ipsec/logging/log-level/node.def5
-rw-r--r--templates/vpn/ipsec/logging/log-modes/node.def28
3 files changed, 33 insertions, 18 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl
index 7dd18f1..89af400 100755
--- a/scripts/vpn-config.pl
+++ b/scripts/vpn-config.pl
@@ -306,23 +306,23 @@ if ($vcVPN->exists('ipsec')) {
}
#
- # log-mode
+ # charon log-mode
#
my @logmodes = $vcVPN->returnValues('ipsec logging log-modes');
+ my $charonloglevel = $vcVPN->returnValue('ipsec logging log-level');
if (@logmodes > 0) {
my $debugmode = '';
+ my $first_debug_mode = 1;
+ $genout .= "\tcharondebug=\"";
foreach my $mode (@logmodes) {
- if ($mode eq "all") {
- $debugmode = "all";
- last;
- }
- if ($debugmode eq '') {
- $debugmode = "$mode";
+ if ($first_debug_mode) {
+ $first_debug_mode = 0;
} else {
- $debugmode .= " $mode";
+ $genout .= ", ";
}
+ $genout .= "$mode $charonloglevel";
}
- $genout .= "\tplutodebug=\"$debugmode\"\n";
+ $genout .= "\"\n";
}
# Set plutoopts:
diff --git a/templates/vpn/ipsec/logging/log-level/node.def b/templates/vpn/ipsec/logging/log-level/node.def
new file mode 100644
index 0000000..54cf698
--- /dev/null
+++ b/templates/vpn/ipsec/logging/log-level/node.def
@@ -0,0 +1,5 @@
+help: strongSwan Logger Level
+type: u32
+default: 1
+syntax:expression: ($VAR(@) >= 0 && $VAR(@) <= 2) ; "must be between levels 0-2"
+val_help: u32:0-2; Logger Verbosity Level (default 0)
diff --git a/templates/vpn/ipsec/logging/log-modes/node.def b/templates/vpn/ipsec/logging/log-modes/node.def
index f0dd9f4..5662a4e 100644
--- a/templates/vpn/ipsec/logging/log-modes/node.def
+++ b/templates/vpn/ipsec/logging/log-modes/node.def
@@ -1,11 +1,21 @@
multi:
-help: Log mode
+help: Log mode. To see what each log mode exactly does, please refer to the strongSwan documentation
type: txt
-syntax:expression: $VAR(@) in "raw", "crypt", "parsing", "emitting", "control", "all", "private" ; "must be one of the following: raw, crypt, parsing, emitting, control, all, private"
-val_help: raw; Debug log option for pluto
-val_help: crypt; Debug log option for pluto
-val_help: parsing; Debug log option for pluto
-val_help: emitting; Debug log option for pluto
-val_help: control; Debug log option for pluto
-val_help: all; Debug log option for pluto
-val_help: private; Debug log option for pluto
+syntax:expression: $VAR(@) in "dmn", "mgr", "ike", "chd", "job", "cfg", "knl", "net", "asn", "enc", "lib", "esp", "tls", "tnc", "imc", "imv", "pts" ; "must be one of the following: dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, esp, tls, tnc, imc, imv, pts"
+val_help: dmn; Debug log option for strongSwan
+val_help: mgr; Debug log option for strongSwan
+val_help: ike; Debug log option for strongSwan
+val_help: chd; Debug log option for strongSwan
+val_help: job; Debug log option for strongSwan
+val_help: cfg; Debug log option for strongSwan
+val_help: knl; Debug log option for strongSwan
+val_help: net; Debug log option for strongSwan
+val_help: asn; Debug log option for strongSwan
+val_help: enc; Debug log option for strongSwan
+val_help: lib; Debug log option for strongSwan
+val_help: esp; Debug log option for strongSwan
+val_help: tls; Debug log option for strongSwan
+val_help: tnc; Debug log option for strongSwan
+val_help: imc; Debug log option for strongSwan
+val_help: imv; Debug log option for strongSwan
+val_help: pts; Debug log option for strongSwan