diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-12-26 20:06:13 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-12-26 20:06:13 +0000 |
commit | a333d970495943557bb6d90b04d08c58db8668dc (patch) | |
tree | 52b26ca95c04e1c0ad4159059a5ab894263b62bf /usr/local/www | |
parent | 01f1631a6be122bfa7f3b1a8219412e6294e05a3 (diff) | |
download | pfsense-a333d970495943557bb6d90b04d08c58db8668dc.zip pfsense-a333d970495943557bb6d90b04d08c58db8668dc.tar.gz |
Do not display the line if we cannot extract the protocol type
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/diag_logs_filter.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index ee54888..e56e3fc 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -73,6 +73,7 @@ function conv_clog($logfile, $tail = 50) { if($log_split[5] == "") preg_match("/(.*)\s(.*)\spf:.*rule.*\(match\):\s(\w+)\sin\son\s(\w+:)\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s([\<|\>])\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}):.*/",$logent,$log_split); + $do_not_display = false; $flent['proto'] = "TCP"; if(stristr($logent, "UDP") == true) $flent['proto'] = "UDP"; @@ -92,6 +93,8 @@ function conv_clog($logfile, $tail = 50) { $flent['proto'] = "CARP"; else if(stristr($logent, "PFSYNC") == true) $flent['proto'] = "PFSYNC"; + else + $do_not_display = true; $flent['time'] = $log_split[1]; $flent['act'] = $log_split[3]; @@ -105,7 +108,7 @@ function conv_clog($logfile, $tail = 50) { $flent['dst'] = $log_split[7]; } - if($flent['src'] == "" or $flent['dst'] == "") { + if($flent['src'] == "" or $flent['dst'] == "" or $do_not_display == true) { /* do not display me! */ } else { $counter++; |