]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Merge remote-tracking branch 'amarx/RC2-master'
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 11 Apr 2014 13:17:08 +0000 (15:17 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 11 Apr 2014 13:17:08 +0000 (15:17 +0200)
html/cgi-bin/firewall.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index e9957943afd6fe751222faab995b715208cbd4d6..9af97d1a88b7e5fa7b39bfca3fd1ba134a7b48f2 100644 (file)
@@ -1260,10 +1260,8 @@ sub get_serviceports
        my $name=shift;
        &General::readhasharray("$configsrv", \%customservice);
        &General::readhasharray("$configsrvgrp", \%customservicegrp);
-       my $tcp;
-       my $udp;
-       my $icmp;
        @protocols=();
+       my @specprot=("IPIP","IPV6","IGMP","GRE","AH","ESP");
        if($type eq 'service'){
                foreach my $key (sort { ncmp($customservice{$a}[0],$customservice{$b}[0]) } keys %customservice){
                        if ($customservice{$key}[0] eq $name){
@@ -1273,33 +1271,19 @@ sub get_serviceports
        }elsif($type eq 'group'){
                foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b}[0]) } keys %customservicegrp){
                        if ($customservicegrp{$key}[0] eq $name){
-                               foreach my $key1 (sort { ncmp($customservice{$a}[0],$customservice{$b}[0]) } keys %customservice){
-                                       if ($customservice{$key1}[0] eq $customservicegrp{$key}[2]){
-                                               if($customservice{$key1}[2] eq 'TCP'){
-                                                       $tcp='TCP';
-                                               }elsif($customservice{$key1}[2] eq 'ICMP'){
-                                                       $icmp='ICMP';
-                                               }elsif($customservice{$key1}[2] eq 'UDP'){
-                                                       $udp='UDP';
+                               if ($customservicegrp{$key}[2] ~~ @specprot){
+                                       push (@protocols," ".$customservicegrp{$key}[2]);
+                               }else{
+                                       foreach my $key1 (sort { ncmp($customservice{$a}[0],$customservice{$b}[0]) } keys %customservice){
+                                               if ($customservice{$key1}[0] eq $customservicegrp{$key}[2]){
+                                                       if (!grep(/$customservice{$key1}[2]/, @protocols)){
+                                                               push (@protocols,$customservice{$key1}[2]);}
                                                }
                                        }
                                }
                        }
                }
        }
-       if($tcp && $udp && $icmp){
-               push (@protocols,"TCP,UDP, <br>ICMP");
-               return @protocols;
-       }
-       if($tcp){
-               push (@protocols,"TCP");
-       }
-       if($udp){
-               push (@protocols,"UDP");
-       }
-       if($icmp){
-               push (@protocols,"ICMP");
-       }
        return @protocols;
 }
 sub getcolor
@@ -2486,7 +2470,7 @@ END
                                push (@protocols,$Lang::tr{'all'});
                        }
 
-                       my $protz=join(",",@protocols);
+                       my $protz=join(", ",@protocols);
                        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){
@@ -2495,6 +2479,8 @@ END
                                                last;
                                        }
                                }
+                       }elsif($#protocols gt '3'){
+                               print"<td align='center'><span title='$protz'>$Lang::tr{'fwdfw many'}</span></td>";
                        }else{
                                print"<td align='center'>$protz</td>";
                        }
index cc567188b6dadbf4df8e279279ca54a7ba930aed..5e8892d767cabf2f11b95e4886e8e646329db3de 100644 (file)
 'fwdfw log' => 'Log',
 'fwdfw log rule' => 'Logging aktivieren',
 'fwdfw man port' => 'Port(s):',
+'fwdfw many' => 'Diverse',
 'fwdfw menu' => 'Firewall',
 'fwdfw movedown' => 'Herunter',
 'fwdfw moveup' => 'Herauf',
index ff5c90a1ddb35108243464d7a9d27ade9b1ea3e9..db31a89ea2e00603dda359042ff8466d10c5cd1a 100644 (file)
 'fwdfw log' => 'Log',
 'fwdfw log rule' => 'Log rule',
 'fwdfw man port' => 'Port(s):',
+'fwdfw many' => 'Many',
 'fwdfw menu' => 'Firewall',
 'fwdfw movedown' => 'Move down',
 'fwdfw moveup' => 'Move up',