";
}
- if ($show eq '1'){$show='';print"";}
#IPsec networks
+ my @IPSEC_N2N=();
foreach my $key (sort { ncmp($ipsecconf{$a}[0],$ipsecconf{$b}[0]) } keys %ipsecconf) {
if ($ipsecconf{$key}[3] eq 'net'){
- print<
- "
+ "
END
- $show='1';
- print"";
+ foreach(@IPSEC_N2N){
+ print"";
}
}
- if ($show eq '1'){$show='';print"
";}
+ print"";
print"";
print"";
print"
";
@@ -1479,9 +1496,28 @@ END
print<
+
+
+
+ $Lang::tr{'remark'}:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
END
}
if($fwhostsettings{'updatesrvgrp'} eq 'on'){
@@ -1584,6 +1620,7 @@ sub getcolor
my $c=shift;
my $sip;
my $scidr;
+ my $tdcolor='';
#Check if MAC
if (&General::validmac($c)){ return $c;}
@@ -1595,7 +1632,7 @@ sub getcolor
}
#Now check if IP is part of ORANGE,BLUE or GREEN
- if ( &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
+ if ( &Header::orange_used() && &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
$tdcolor="$c";
return $tdcolor;
}
@@ -1603,7 +1640,7 @@ sub getcolor
$tdcolor="$c";
return $tdcolor;
}
- if ( &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
+ if ( &Header::blue_used() && &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
$tdcolor="$c";
return $tdcolor;
}
@@ -1648,10 +1685,13 @@ sub getcolor
#Check if IP is part of a IPsec N2N network
foreach my $key (sort keys %ipsecconf){
- my ($a,$b) = split("/",$ipsecconf{$key}[11]);
- if (&General::IpInSubnet($sip,$a,$b)){
- $tdcolor="$c";
- return $tdcolor;
+ if ($ipsecconf{$key}[11]){
+ my ($a,$b) = split("/",$ipsecconf{$key}[11]);
+ $b=&General::iporsubtodec($b);
+ if (&General::IpInSubnet($sip,$a,$b)){
+ $tdcolor="$c";
+ return $tdcolor;
+ }
}
}
return "$c";
@@ -1800,11 +1840,11 @@ sub viewtablegrp
print "$customgrp{$key}[2]";
}
if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost err emptytable'}){
- print "
$Lang::tr{'fwhost deleted'}
$customgrp{$key}[3]
";
+ print "
$Lang::tr{'fwhost deleted'}
$Lang::tr{'fwhost '.$customgrp{$key}[3]}
";
}else{
my ($colip,$colsub) = split("/",$ip);
- $ip="$colip/".&General::subtocidr($colsub) if ($colsub);
- print"
".&getcolor($ip)."
$customgrp{$key}[3]
";
+ $ip="$colip/".&General::iporsubtocidr($colsub) if ($colsub);
+ print"
".&getcolor($ip)."
$Lang::tr{'fwhost '.$customgrp{$key}[3]}
";
}
if ($delflag > 0 && $ip ne ''){
print"";
@@ -1815,8 +1855,7 @@ sub viewtablegrp
}
}
}
- print"