From: Alexander Marx Date: Wed, 6 Feb 2013 14:14:15 +0000 (+0100) Subject: Forward Firewall: Bugfix: now the Protocols are corrected in the tablerule if a servi... X-Git-Tag: v2.15-beta1~286^2~11^2~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5edf47ffbac2f7a8a668c8b64addd767c3df306b;p=ipfire-2.x.git Forward Firewall: Bugfix: now the Protocols are corrected in the tablerule if a servicegroup was used --- diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index c3acfca282..7e173f5053 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -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