Fix firewall log dynamic rule lookup master

for rows that are dynamically added as time goes by.
See https://github.com/pfsense/pfsense/pull/2014 for version for RELENG_2_2.

This is theoretically the fix. But due to other issues that mean dynamic updates to not happen at all in 2.3-ALPHA, I haven't been able to actually test it just yet.
This commit is contained in:
Phil Davis 2015-11-02 22:27:09 +05:45
parent 0c499bef7f
commit 56b3dd9ca9

View File

@ -445,13 +445,13 @@ function handle_ajax($nentries, $tail = 50) {
$filterlog = isset($config['syslog']['reverse']) ? array_reverse($filterlog) : $filterlog;
foreach ($filterlog as $log_row) {
$row_time = strtotime($log_row['time']);
$img = '<i class="icon-large ' . find_action_image($log_row['act']) . '" alt={$log_row[\'act\']} title={$log_row[\'act\']} ></i>"';
$img = '<i class="icon-large ' . find_action_image($log_row['act']) . '" alt={$log_row[\'act\']}/{$log_row[\'tracker\']} title={$log_row[\'act\']}/{$log_row[\'tracker\']} ></i>"';
if ($row_time > $lastsawtime) {
if ($log_row['proto'] == "TCP") {
$log_row['proto'] .= ":{$log_row['tcpflags']}";
}
$btn = "<a href=\"#\" class=\"btn btn-danger btn-xs\" onClick=\"javascript:getURL('diag_logs_filter.php?getrulenum={$log_row['rulenum']},{$log_row['rulenum']}', outputrule);\">" . gettext("Block") . " </a>";
$btn = "<a href=\"#\" class=\"btn btn-danger btn-xs\" onClick=\"javascript:getURL('diag_logs_filter.php?getrulenum={$log_row['rulenum']},{$log_row['tracker']},{$log_row['act']}', outputrule);\">" . gettext("Block") . " </a>";
$new_rules .= "{$btn}||{$log_row['time']}||{$log_row['interface']}||{$log_row['srcip']}||{$log_row['srcport']}||{$log_row['dstip']}||{$log_row['dstport']}||{$log_row['proto']}||{$log_row['version']}||" . time() . "||\n";
}
}