X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=src%2FPVE%2FFirewall.pm;h=7a68642c42cf2ce66c82f2efec382aae01911a9d;hp=57c22fb439439bc3f85c2bbd74af9ec1f87df218;hb=72f63fde6e68abfa9b1b4e35d63f4788086d2c1c;hpb=1ec3e3d0ee5278c192a12dbaf0f95cbe1668093d diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index 57c22fb..7a68642 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -947,9 +947,9 @@ sub generate_tap_rules_direction { my $policy; if ($direction eq 'OUT') { - $policy = $options->{'policy-out'} || 'ACCEPT'; # allow everything by default + $policy = $options->{policy_out} || 'ACCEPT'; # allow everything by default } else { - $policy = $options->{'policy-in'} || 'DROP'; # allow nothing by default + $policy = $options->{policy_in} || 'DROP'; # allow nothing by default } my $accept_action = $direction eq 'OUT' ? "PVEFW-SET-ACCEPT-MARK" : "ACCEPT"; @@ -991,7 +991,7 @@ sub enable_host_firewall { } # implement input policy - my $policy = $options->{'policy-in'} || 'DROP'; # allow nothing by default + my $policy = $options->{policy_in} || 'DROP'; # allow nothing by default ruleset_add_chain_policy($ruleset, $chain, $policy, $loglevel, $accept_action); # host outbound firewall @@ -1016,7 +1016,7 @@ sub enable_host_firewall { } # implement output policy - $policy = $options->{'policy-out'} || 'ACCEPT'; # allow everything by default + $policy = $options->{policy_out} || 'ACCEPT'; # allow everything by default ruleset_add_chain_policy($ruleset, $chain, $policy, $loglevel, $accept_action); ruleset_addrule($ruleset, "PVEFW-OUTPUT", "-j PVEFW-HOST-OUT"); @@ -1212,7 +1212,7 @@ sub parse_vmfw_option { } elsif ($line =~ m/^(log_level_in|log_level_out):\s*(($loglevels)\s*)?$/i) { $opt = lc($1); $value = $2 ? lc($3) : ''; - } elsif ($line =~ m/^(policy-(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) { + } elsif ($line =~ m/^(policy_(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) { $opt = lc($1); $value = uc($3); } else { @@ -1236,7 +1236,7 @@ sub parse_hostfw_option { } elsif ($line =~ m/^(log_level_in|log_level_out|tcp_flags_log_level|smurf_log_level):\s*(($loglevels)\s*)?$/i) { $opt = lc($1); $value = $2 ? lc($3) : ''; - } elsif ($line =~ m/^(policy-(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) { + } elsif ($line =~ m/^(policy_(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) { $opt = lc($1); $value = uc($3); } elsif ($line =~ m/^(nf_conntrack_max):\s*(\d+)\s*$/i) {