From 6e62882de69ad42efcb4c3c2097abb5d5c54666c Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Mon, 7 Oct 2013 14:54:57 +0200 Subject: [PATCH] Firewall: fix senseless if clause in rulecreation --- config/forwardfw/rules.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/forwardfw/rules.pl b/config/forwardfw/rules.pl index 5116844b7..fcaade2d6 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'){ -- 2.39.2