mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-05 03:18:00 +02:00
Forward Firewall: colorize ip addresses when possible in firewall groups. subnetmask now in cidr format
This commit is contained in:
committed by
Michael Tremer
parent
f1934a05ad
commit
72586f0ff0
@@ -817,6 +817,10 @@ sub checkrule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( $fwdfwsettings{'USE_SRC_PORT'} ne 'ON' && $fwdfwsettings{'USESRV'} ne 'ON'){
|
||||||
|
$fwdfwsettings{'PROT'}='';
|
||||||
|
$fwdfwsettings{'TGT_PROT'}='';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sub checkcounter
|
sub checkcounter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1362,7 +1362,7 @@ sub viewtablenet
|
|||||||
}else{
|
}else{
|
||||||
print<<END;
|
print<<END;
|
||||||
<table border='0' width='100%' cellspacing='0'>
|
<table border='0' width='100%' cellspacing='0'>
|
||||||
<tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost netaddress'}</td><td align='center'><b>$Lang::tr{'netmask'}</td><td align='center'><b>$Lang::tr{'remark'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
|
<tr><td align='center'><b>$Lang::tr{'name'}</td><td align='center'><b>$Lang::tr{'fwhost netaddress'}</td><td align='center'><b>$Lang::tr{'remark'}</td><td align='center'><b>$Lang::tr{'used'}</td><td></td><td width='3%'></td></tr>
|
||||||
END
|
END
|
||||||
}
|
}
|
||||||
my $count=0;
|
my $count=0;
|
||||||
@@ -1376,7 +1376,8 @@ END
|
|||||||
{
|
{
|
||||||
print" <tr bgcolor='$color{'color20'}'>";
|
print" <tr bgcolor='$color{'color20'}'>";
|
||||||
}
|
}
|
||||||
print"<td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width=15%' align='center'>".&Header::colorize($customnetwork{$key}[1])."</td><td width='15%' align='center'>$customnetwork{$key}[2]</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$customnetwork{$key}[4]x</td>";
|
my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]);
|
||||||
|
print"<td width='20%'><form method='post'>$customnetwork{$key}[0]</td><td width=15%' align='center'>".&Header::colorize($colnet)."</td><td width='40%'>$customnetwork{$key}[3]</td><td align='center'>$customnetwork{$key}[4]x</td>";
|
||||||
print<<END;
|
print<<END;
|
||||||
<td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
|
<td width='1%'><input type='image' src='/images/edit.gif' align='middle' alt=$Lang::tr{'edit'} title=$Lang::tr{'edit'} />
|
||||||
<input type='hidden' name='ACTION' value='editnet'>
|
<input type='hidden' name='ACTION' value='editnet'>
|
||||||
@@ -1511,6 +1512,8 @@ sub viewtablegrp
|
|||||||
if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost empty'}){
|
if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost empty'}){
|
||||||
print "<td align='center'>$Lang::tr{'fwhost deleted'}</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>";
|
print "<td align='center'>$Lang::tr{'fwhost deleted'}</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>";
|
||||||
}else{
|
}else{
|
||||||
|
my ($colip,$colsub) = split("/",$ip);
|
||||||
|
$ip="$colip/".&General::subtocidr($colsub) if ($colsub);
|
||||||
print"<td align='center'>".&Header::colorize($ip)."</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>";
|
print"<td align='center'>".&Header::colorize($ip)."</td><td align='center'>$customgrp{$key}[3]</td><td width='1%'><form method='post'>";
|
||||||
}
|
}
|
||||||
if ($delflag > '1' && $ip ne ''){
|
if ($delflag > '1' && $ip ne ''){
|
||||||
|
|||||||
Reference in New Issue
Block a user