Regression #12605
closed``diag_dump_states.php`` no longer filters by rule ID
0%
Description
The webgui state table output can be filtered by rule ID by calling it directly, for example:
https://26dev.stevew.lan/diag_dump_states.php?ruleid=96,97
That is used when clicking on the state/packet counters on a firewall rule.
In 2.6/22.01 that no longer funtions, the state table returns no results.
Tested:
22.01-BETA (amd64) built on Wed Dec 15 21:39:39 UTC 2021 FreeBSD 12.3-STABLE
2.6.0-BETA (amd64) built on Thu Dec 16 06:22:38 UTC 2021 FreeBSD 12.3-STABLE
Updated by Jim Pingle almost 3 years ago
Looks like we are passing in the ruleid to the pfSense_get_pf_states();
function in the pfSense module correctly, but somehow it isn't matching in the module code.
If you don't filter and look at the data passed back from the module to PHP, it looks like it should have matched, but didn't. Parameter it sends is ruleid
, code in the module looks at that ruleid
and compares it to the rule
field in the state data. The data being passed back without any filtering has a rule
field and it appears like it should be the same (both int, number the same).
So probably still something else in the module code that needs adjusted, perhaps the data type of the field is different since it's nvlist now IIRC.
Updated by Christian McDonald almost 3 years ago
Updated by Christian McDonald almost 3 years ago
- Status changed from New to Feedback
Updated by Christian McDonald almost 3 years ago
- Category changed from Web Interface to PHP Interpreter
Updated by Christian McDonald almost 3 years ago
For interested parties, the issue was caused by network byte order backpedaling being moved into libpfctl for state exports. Our PHP extension was still performing this transformation on top of libpfctl which was mangling the variable.
Updated by Steve Wheeler almost 3 years ago
- Status changed from Feedback to Resolved
This looks good in the current snapshots. The link(s) works. The states are filtered as expected.
Tested:
22.01-BETA (amd64) built on Wed Jan 05 15:05:08 UTC 2022 FreeBSD 12.3-STABLE
2.6.0-BETA (amd64) built on Wed Jan 05 15:01:12 UTC 2022 FreeBSD 12.3-STABLE
Updated by Jim Pingle almost 3 years ago
- Subject changed from diag_dump_states.php no longer filters by rule ID to ``diag_dump_states.php`` no longer filters by rule ID
Updating subject for release notes.