Firewall: Diagnostics: Statistics - fix incorrect packet counters, closes https://github.com/opnsense/core/issues/7332

This commit is contained in:
Ad Schellevis 2024-03-16 20:00:02 +01:00
parent 15e477393f
commit 8faa33eeba

View File

@ -91,7 +91,7 @@ def pfctl_interfaces():
result[heading_line][topic] = int(line)
elif line.find('Packets') > -1 and line.find('Bytes') > -1:
parts = line.split()
result[heading_line]["%s_packets" % topic] = int(parts[4])
result[heading_line]["%s_packets" % topic] = int(parts[2])
result[heading_line]["%s_bytes" % topic] = int(parts[4])
return result