Project

General

Profile

Actions

Regression #12605

closed

``diag_dump_states.php`` no longer filters by rule ID

Added by Steve Wheeler almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
PHP Interpreter
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
2.6.0
Affected Architecture:
All

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
Actions #1

Updated by Scott Long almost 3 years ago

  • Assignee set to Christian McDonald
Actions #2

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.

Actions #4

Updated by Christian McDonald almost 3 years ago

  • Status changed from New to Feedback
Actions #5

Updated by Christian McDonald almost 3 years ago

  • Category changed from Web Interface to PHP Interpreter
Actions #6

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.

Actions #7

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

Actions #8

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.

Actions

Also available in: Atom PDF