Skip to content

Commit

Permalink
firewall/live-log, when changing the optimisation mode the line numbe…
Browse files Browse the repository at this point in the history
…rs 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

(cherry picked from commit 1d1ce84)
  • Loading branch information
AdSchellevis authored and fichtner committed Jul 1, 2019
1 parent 488a7d6 commit f855ae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opnsense/scripts/filter/read_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def fetch_rules_descriptions():
result = dict()
if os.path.isfile('/tmp/rules.debug'):
with tempfile.NamedTemporaryFile() as output_stream:
subprocess.call(['/sbin/pfctl', '-vvPnf', '/tmp/rules.debug'], stdout=output_stream, stderr=open(os.devnull, 'wb'))
subprocess.call(['/sbin/pfctl', '-vvPsr'], stdout=output_stream, stderr=open(os.devnull, 'wb'))
output_stream.seek(0)
for line in output_stream.read().strip().split('\n'):
if line.startswith('@'):
Expand Down

0 comments on commit f855ae7

Please sign in to comment.