summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/diag_logs_filter.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index 577ce5b..f171877 100755
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -106,6 +106,9 @@ function conv_clog($logfile, $tail) {
$flent['proto'] = ereg_replace(":", "", $flent['proto']);
$flent['proto'] = ereg_replace(",", "", $flent['proto']);
+ $flent['src'] = convert_port_period_to_colon($flent['src']);
+ $flent['dst'] = convert_port_period_to_colon($flent['dst']);
+
if($flent['proto'] == "S" or $flent['proto'] == "NBT" or $flent['proto'] == "." or $flent['proto'] == "R" or $flent['proto'] == ">") $dontdisplay = 1;
if($dontdisplay == 0)
@@ -115,6 +118,12 @@ function conv_clog($logfile, $tail) {
return $filterlog;
}
+function convert_port_period_to_colon($addr) {
+ $addr_split = split("\.", $addr);
+ $newvar = $addr_split[0] . "." . $addr_split[1] . "." . $addr_split[2] . "." . $addr_split[3] . ":" . $addr_split[4];
+ return $newvar;
+}
+
function format_ipf_ip($ipfip) {
list($ip,$port) = explode(",", $ipfip);
if (!$port)
OpenPOWER on IntegriCloud