X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=src%2FPVE%2FFirewall.pm;h=7f3e5ac3dc32dfe9fc20aa18fca5de1f15921c12;hp=8c8db821e0ec3dbd88aa398bb455a00cbab71948;hb=73089769fe5c88dc64e47153ab447d4af4197ffb;hpb=d4091b82a4ec15672557b629c505b395ef8dba1f diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index 8c8db82..7f3e5ac 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -1537,22 +1537,20 @@ sub ruleset_generate_vm_rules { sub generate_nfqueue { my ($options) = @_; - my $action = ""; - if($options->{ips}){ - $action = "NFQUEUE"; - if($options->{ips_queues} && $options->{ips_queues} =~ m/^(\d+)(:(\d+))?$/) { - if(defined($3) && defined($1)) { + if ($options->{ips}) { + my $action = "NFQUEUE"; + if ($options->{ips_queues} && $options->{ips_queues} =~ m/^(\d+)(:(\d+))?$/) { + if (defined($3) && defined($1)) { $action .= " --queue-balance $1:$3"; - }elsif (defined($1)) { + } elsif (defined($1)) { $action .= " --queue-num $1"; } } $action .= " --queue-bypass" if $feature_ipset_nomatch; #need kernel 3.10 - }else{ - $action = "ACCEPT"; + return $action; + } else { + return "ACCEPT"; } - - return $action; } sub ruleset_generate_vm_ipsrules {