mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
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
This commit is contained in:
parent
6b6e3ed32d
commit
1d1ce841ff
@ -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'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user