summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/filter_log.inc
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-11-25 07:40:11 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2015-11-25 07:41:03 -0600
commit5fdd4a041985a453c4eece5229ae0c77b552d032 (patch)
treef6639b1974f534693b76fb8066703a905c82d170 /src/etc/inc/filter_log.inc
parent916878b2678be45a3ca5e694468993277a8ed2a6 (diff)
downloadpfsense-5fdd4a041985a453c4eece5229ae0c77b552d032.zip
pfsense-5fdd4a041985a453c4eece5229ae0c77b552d032.tar.gz
Always read the ruleset from kernel, it's already parsed there.
These changes were based on Pull Request #2113. Submitted by: NOYB
Diffstat (limited to 'src/etc/inc/filter_log.inc')
-rw-r--r--src/etc/inc/filter_log.inc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc
index 650ed78..ea45aa9 100644
--- a/src/etc/inc/filter_log.inc
+++ b/src/etc/inc/filter_log.inc
@@ -335,11 +335,7 @@ function find_rule_by_number($rulenum, $trackernum, $type="block") {
if ($type == "rdr") {
$_gb = exec("/sbin/pfctl -vvPsn -a \"miniupnpd\" | /usr/bin/egrep " . escapeshellarg("^@{$rulenum}"), $buffer);
} else {
- if (file_exists("{$g['tmp_path']}/rules.debug")) {
- $_gb = exec("/sbin/pfctl -vvPnf {$g['tmp_path']}/rules.debug 2>/dev/null | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
- } else {
- $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
- }
+ $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
}
if (is_array($buffer)) {
return $buffer[0];
@@ -364,11 +360,7 @@ function buffer_rules_load() {
}
}
unset($buffer, $_gb);
- if (file_exists("{$g['tmp_path']}/rules.debug")) {
- $_gb = exec("/sbin/pfctl -vvPnf {$g['tmp_path']}/rules.debug 2>/dev/null | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]' | /usr/bin/egrep -v '^@[0-9]+\([0-9]+\)[[:space:]](nat|rdr|binat|no|scrub)'", $buffer);
- } else {
- $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]'", $buffer);
- }
+ $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]'", $buffer);
if (is_array($buffer)) {
foreach ($buffer as $line) {
OpenPOWER on IntegriCloud