foreach my $DPROT (@DPROT){
$DPORT = &get_port($hash,$key,$DPROT);
$PROT=$DPROT;
- $PROT="-p $PROT" if ($PROT ne '');
+ $PROT="-p $PROT" if ($PROT ne '' && $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'){
foreach my $DPROT (@DPROT){
$DPORT = &get_port($hash,$key,$DPROT);
$PROT=$DPROT;
- $PROT="-p $PROT" if ($PROT ne '');
+ $PROT="-p $PROT" if ($PROT ne '' && $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'){
else{
document.getElementById(id).style.display='none';
}
+ if(document.getElementById('targetport').style.display== "none" && document.getElementById('PROT').value === 'ICMP' )
+ {
+ document.getElementById('PROTOKOLL').style.display='block';
+ }
+ if(document.getElementById('targetport').style.display== "block" && document.getElementById('PROT').value === 'ICMP' )
+ {
+ document.getElementById('PROTOKOLL').style.display='none';
+ }
return true;
}
function hide_elements()
if ($fwdfwsettings{'USESRV'} ne 'ON'){
print"<script language='JavaScript'>hide_elements('targetport');</script>";
}
+ if ($fwdfwsettings{'USESRV'} eq 'ON' && $fwdfwsettings{'PROT'} eq 'ICMP'){
+ print"<script language='JavaScript'>hide_elements('PROTOKOLL');</script>";
+ }
&Header::closebox;
#---Activate/logging/remark-------------------------------------
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'});