From: Alexander Marx Date: Mon, 7 Oct 2013 12:54:57 +0000 (+0200) Subject: Firewall: fix senseless if clause in rulecreation X-Git-Tag: v2.15-beta1~195^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e62882de69ad42efcb4c3c2097abb5d5c54666c;p=people%2Fms%2Fipfire-2.x.git Firewall: fix senseless if clause in rulecreation --- diff --git a/config/forwardfw/rules.pl b/config/forwardfw/rules.pl index 5116844b7e..fcaade2d66 100755 --- a/config/forwardfw/rules.pl +++ b/config/forwardfw/rules.pl @@ -256,7 +256,7 @@ sub buildrules 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'){ - if($DPROT eq ' ' || $DPROT ne ''){ + if($DPROT ne ''){ if(substr($sourcehash{$a}[0], 3, 3) ne 'mac' && $sourcehash{$a}[0] ne ''){ $STAG="-s";} if(substr($DPORT, 2, 4) eq 'icmp'){ my @icmprule= split(",",substr($DPORT, 12,)); @@ -315,7 +315,7 @@ sub buildrules 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'){ - if($DPROT ne '' || $DPROT eq ' '){ + if($DPROT ne ''){ if(substr($sourcehash{$a}[0], 3, 3) ne 'mac' && $sourcehash{$a}[0] ne ''){ $STAG="-s";} #Process ICMP RULE if(substr($DPORT, 2, 4) eq 'icmp'){