]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall: Bugfix: now the Protocols are corrected in the tablerule if a servi...
authorAlexander Marx <amarx@ipfire.org>
Wed, 6 Feb 2013 14:14:15 +0000 (15:14 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:17 +0000 (14:08 +0200)
html/cgi-bin/forwardfw.cgi

index c3acfca282911388678888c60acdfd7e6456e74f..7e173f5053d44bbb4045465ecba796f4276f150b 100755 (executable)
@@ -1703,16 +1703,20 @@ sub get_serviceports
                                $protocols=$customservice{$key}[2];
                        }
                }
-               
        }elsif($type eq 'group'){
                foreach my $key (sort { uc($customservicegrp{$a}[0]) cmp uc($customservicegrp{$b}[0]) } keys %customservicegrp){
                        if ($customservicegrp{$key}[0] eq $name){
-                               if($customservicegrp{$key}[4] eq 'TCP'){$tcp='TCP';}else{$udp='UDP';}
+                               foreach my $key1 (sort { uc($customservice{$a}[0]) cmp uc($customservice{$b}[0]) } keys %customservice){
+                                       if ($customservice{$key1}[0] eq $customservicegrp{$key}[2]){
+                                               if($customservice{$key1}[2] eq 'TCP'){$tcp='TCP';}else{$udp='UDP';}
+                                       }
+                               }
                        }
                }
        }
-       if($tcp){$protocols.="TCP";}
-       if($udp){$protocols.=",UDP";}
+       if($tcp && $udp){$protocols="TCP,UDP";
+       }elsif($tcp){$protocols.="TCP";
+       }elsif($udp){$protocols.="UDP";}
        return $protocols;
 }
 sub viewtablerule