Firewall: fixed rules.pl (no INPUT rules where created when using port and prot "all")

This is a bug which was raised due to the last commit
This commit is contained in:
Alexander Marx
2013-10-01 07:45:58 +02:00
parent 4c27368a7b
commit 285de10662

View File

@@ -538,10 +538,12 @@ sub get_prot
}
}elsif($$hash{$key}[11] eq 'ON' && $SRC_TGT eq ''){
if ($$hash{$key}[14] eq 'TGT_PORT'){
if ($$hash{$key}[15] ne ''){
return "$$hash{$key}[8]";
if ($$hash{$key}[15] ne '' && $$hash{$key}[8] eq ''){
return "TCP,UDP";
}elsif($$hash{$key}[13] ne ''){
return "$$hash{$key}[8]";
}elsif($$hash{$key}[15] ne ''){
return "$$hash{$key}[8]";
}else{
return "$$hash{$key}[8]";
}