From 79a586b167a0a490d2dfa2e3c23be84fd31e9897 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 13 Feb 2006 02:04:16 +0000 Subject: [PATCH] If we could not parse a filter log rule, log the rule and ask them to report the rule to mailing list or forum --- usr/local/www/diag_logs_filter.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index e5c0598098..bdbf83fb38 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -128,15 +128,21 @@ function conv_clog($logfile, $tail = 50) { $tmp = split("/", $log_split[2]); $flent['rulenum'] = $tmp[0]; + $shouldadd = true; + if($flent['src'] == "") - continue; + $shouldadd = false; if($flent['dst'] == "") - continue; + $shouldadd = true; if($flent['time'] == "") - continue; + $shouldadd = true; - $counter++; - $filterlog[] = $flent; + if($shouldadd == true) { + $counter++; + $filterlog[] = $flent; + } else { + log_error("There was a error parsing rule: $logent . Please report to mailing list or forum."); + } }