mirror of
git://git.proxmox.com/git/pve-firewall.git
synced 2025-01-02 01:18:00 +03:00
fix #5925: vnet: add parsing logic for log_level_forward
We currently don't parse the log_level_forward option from the vnet configuration, which leads to the value not being returned from the API and always showing up as the default nolog value. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
parent
b5377394d1
commit
c600be9cf6
@ -3053,12 +3053,17 @@ sub parse_vnetfw_option {
|
||||
|
||||
my ($opt, $value);
|
||||
|
||||
my $loglevels = "emerg|alert|crit|err|warning|notice|info|debug|nolog";
|
||||
|
||||
if ($line =~ m/^(enable):\s*(\d+)\s*$/i) {
|
||||
$opt = lc($1);
|
||||
$value = int($2);
|
||||
} elsif ($line =~ m/^(policy_forward):\s*(ACCEPT|DROP)\s*$/i) {
|
||||
$opt = lc($1);
|
||||
$value = uc($2);
|
||||
} elsif ($line =~ m/^(log_level_forward):\s*($loglevels)\s*$/i) {
|
||||
$opt = lc($1);
|
||||
$value = lc($2);
|
||||
} else {
|
||||
die "can't parse option '$line'\n"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user