]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Firewall: Bugfix: WHen using servicegroup with only ICMP services, the ruletable...
authorAlexander Marx <amarx@ipfire.org>
Tue, 8 Oct 2013 08:08:09 +0000 (10:08 +0200)
committerAlexander Marx <amarx@ipfire.org>
Tue, 8 Oct 2013 08:08:09 +0000 (10:08 +0200)
config/forwardfw/rules.pl
html/cgi-bin/forwardfw.cgi

index fcaade2d6632f3416ff742b161642e8c72c73ba7..3abe02bab47f574446b7cfe5cf07623738375d51 100755 (executable)
@@ -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'){
index c16fd0ade785a7dcc244faae05f937f20ab7a7f9..4c70a2503d30a71af81f5256e8eb7bf3043dcc21 100755 (executable)
@@ -2254,7 +2254,7 @@ END
                                push (@protocols,$Lang::tr{'all'});
                        }
                        my $protz=join(",",@protocols);
-                       if($protz eq 'ICMP' && $$hash{$key}[9] ne 'All ICMP-Types'){
+                       if($protz eq 'ICMP' && $$hash{$key}[9] ne 'All ICMP-Types' && $$hash{$key}[14] ne 'cust_srvgrp'){
                                &General::readhasharray("${General::swroot}/fwhosts/icmp-types", \%icmptypes);
                                foreach my $keyicmp (sort { ncmp($icmptypes{$a}[0],$icmptypes{$b}[0]) }keys %icmptypes){
                                        if($$hash{$key}[9] eq "$icmptypes{$keyicmp}[0]"){