mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Forward Firewall: Bugfix: now the Protocols are corrected in the tablerule if a servicegroup was used
This commit is contained in:
committed by
Michael Tremer
parent
7772ae734e
commit
5edf47ffba
@@ -1703,16 +1703,20 @@ sub get_serviceports
|
|||||||
$protocols=$customservice{$key}[2];
|
$protocols=$customservice{$key}[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}elsif($type eq 'group'){
|
}elsif($type eq 'group'){
|
||||||
foreach my $key (sort { uc($customservicegrp{$a}[0]) cmp uc($customservicegrp{$b}[0]) } keys %customservicegrp){
|
foreach my $key (sort { uc($customservicegrp{$a}[0]) cmp uc($customservicegrp{$b}[0]) } keys %customservicegrp){
|
||||||
if ($customservicegrp{$key}[0] eq $name){
|
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($tcp && $udp){$protocols="TCP,UDP";
|
||||||
if($udp){$protocols.=",UDP";}
|
}elsif($tcp){$protocols.="TCP";
|
||||||
|
}elsif($udp){$protocols.="UDP";}
|
||||||
return $protocols;
|
return $protocols;
|
||||||
}
|
}
|
||||||
sub viewtablerule
|
sub viewtablerule
|
||||||
|
|||||||
Reference in New Issue
Block a user