From 1d1ce841ffe9d4b7e0d96b83e92d0a2f1cf660cd Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sat, 29 Jun 2019 15:29:04 +0200 Subject: [PATCH] firewall/live-log, when changing the optimisation mode the line numbers don't seem to add up any more. Previously we used to parse the pf config to show our rules, it looks safer to use the actual running config using -vvPsr ref https://forum.opnsense.org/index.php?topic=13308.0 --- src/opnsense/scripts/filter/read_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/scripts/filter/read_log.py b/src/opnsense/scripts/filter/read_log.py index 3decb92bf..a026a612e 100755 --- a/src/opnsense/scripts/filter/read_log.py +++ b/src/opnsense/scripts/filter/read_log.py @@ -86,7 +86,7 @@ def fetch_rule_details(): # use pfctl to create a list per rule number with the details found with tempfile.NamedTemporaryFile() as output_stream: - subprocess.call(['/sbin/pfctl', '-vvPnf', '/tmp/rules.debug'], + subprocess.call(['/sbin/pfctl', '-vvPsr'], stdout=output_stream, stderr=open(os.devnull, 'wb')) output_stream.seek(0) for line in output_stream.read().decode().strip().split('\n'):