Commit 4ff63360 authored by Ad Schellevis's avatar Ad Schellevis

Merge pull request #509 from 8191/pfinfo_rules

firewall: extend pfInfo by active rules
parents 07cd06a9 ff1c9001
...@@ -37,7 +37,7 @@ import ujson ...@@ -37,7 +37,7 @@ import ujson
if __name__ == '__main__': if __name__ == '__main__':
result = collections.OrderedDict() result = collections.OrderedDict()
for stattype in ['info', 'memory', 'timeouts', 'Interfaces']: for stattype in ['info', 'memory', 'timeouts', 'Interfaces', 'rules']:
with tempfile.NamedTemporaryFile() as output_stream: with tempfile.NamedTemporaryFile() as output_stream:
subprocess.call(['/sbin/pfctl', '-vvs'+stattype], stdout=output_stream, stderr=open(os.devnull, 'wb')) subprocess.call(['/sbin/pfctl', '-vvs'+stattype], stdout=output_stream, stderr=open(os.devnull, 'wb'))
output_stream.seek(0) output_stream.seek(0)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
$pgtitle = gettext("Diagnostics: pfInfo"); $pgtitle = gettext("Diagnostics: pfInfo");
$data_tabs = array("info", "memory", "timeouts", "interfaces"); $data_tabs = array("info", "memory", "timeouts", "interfaces", "rules");
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_POST['getactivity'])) { if (isset($_POST['getactivity'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment