mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
Firewall: fix coloring of internet hosts
This commit is contained in:
committed by
Michael Tremer
parent
6effa000ec
commit
1ccfb89eab
@@ -66,7 +66,6 @@ my $fwconfigfwd = "${General::swroot}/firewall/config";
|
|||||||
my $fwconfiginp = "${General::swroot}/firewall/input";
|
my $fwconfiginp = "${General::swroot}/firewall/input";
|
||||||
my $fwconfigout = "${General::swroot}/firewall/outgoing";
|
my $fwconfigout = "${General::swroot}/firewall/outgoing";
|
||||||
my $configovpn = "${General::swroot}/ovpn/settings";
|
my $configovpn = "${General::swroot}/ovpn/settings";
|
||||||
my $tdcolor='';
|
|
||||||
my $configipsecrw = "${General::swroot}/vpn/settings";
|
my $configipsecrw = "${General::swroot}/vpn/settings";
|
||||||
|
|
||||||
unless (-e $confignet) { system("touch $confignet"); }
|
unless (-e $confignet) { system("touch $confignet"); }
|
||||||
@@ -1624,6 +1623,7 @@ sub getcolor
|
|||||||
my $c=shift;
|
my $c=shift;
|
||||||
my $sip;
|
my $sip;
|
||||||
my $scidr;
|
my $scidr;
|
||||||
|
my $tdcolor='';
|
||||||
#Check if MAC
|
#Check if MAC
|
||||||
if (&General::validmac($c)){ return $c;}
|
if (&General::validmac($c)){ return $c;}
|
||||||
|
|
||||||
@@ -1688,10 +1688,13 @@ sub getcolor
|
|||||||
|
|
||||||
#Check if IP is part of a IPsec N2N network
|
#Check if IP is part of a IPsec N2N network
|
||||||
foreach my $key (sort keys %ipsecconf){
|
foreach my $key (sort keys %ipsecconf){
|
||||||
my ($a,$b) = split("/",$ipsecconf{$key}[11]);
|
if ($ipsecconf{$key}[11]){
|
||||||
if (&General::IpInSubnet($sip,$a,$b)){
|
my ($a,$b) = split("/",$ipsecconf{$key}[11]);
|
||||||
$tdcolor="<font style='color: $Header::colourvpn;'>$c</font>";
|
$b=&General::iporsubtodec($b);
|
||||||
return $tdcolor;
|
if (&General::IpInSubnet($sip,$a,$b)){
|
||||||
|
$tdcolor="<font style='color: $Header::colourvpn;'>$c</font>";
|
||||||
|
return $tdcolor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "$c";
|
return "$c";
|
||||||
|
|||||||
Reference in New Issue
Block a user