Firewall: Bugfix: WHen using servicegroup with only ICMP services, the ruletable was broken. Also fixed another useless if clause in rules.pl

This commit is contained in:
Alexander Marx
2013-10-08 10:08:09 +02:00
parent 6e62882de6
commit 90f8339a42
2 changed files with 3 additions and 3 deletions

View File

@@ -252,7 +252,7 @@ sub buildrules
foreach my $DPROT (@DPROT){
$DPORT = &get_port($hash,$key,$DPROT);
$PROT=$DPROT;
$PROT="-p $PROT" if ($PROT ne '' && $PROT ne ' ');
$PROT="-p $PROT" if ($PROT ne '');
foreach my $a (sort keys %sourcehash){
foreach my $b (sort keys %targethash){
if ($sourcehash{$a}[0] ne $targethash{$b}[0] && $targethash{$b}[0] ne 'none' || $sourcehash{$a}[0] eq '0.0.0.0/0.0.0.0'){
@@ -311,7 +311,7 @@ sub buildrules
foreach my $DPROT (@DPROT){
$DPORT = &get_port($hash,$key,$DPROT);
$PROT=$DPROT;
$PROT="-p $PROT" if ($PROT ne '' && $PROT ne ' ');
$PROT="-p $PROT" if ($PROT ne '');
foreach my $a (sort keys %sourcehash){
foreach my $b (sort keys %targethash){
if ($sourcehash{$a}[0] ne $targethash{$b}[0] && $targethash{$b}[0] ne 'none' || $sourcehash{$a}[0] eq '0.0.0.0/0.0.0.0'){