Fix for failing 'counter ipsec ...' rule
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tests/py: Add a test for failing ipsec after countertests/ tests/ tests/ | +29 | 0 replies | |
| 2/2 | Revert "scanner: remove saddr/daddr from initial state"src/ | +2 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [nft PATCH 0/2] Fix for failing 'counter ipsec ...' rule
The following rule is rejected by the parser:
| oifname "s_c" counter packets 0 bytes 0 ipsec out ip daddr 192.168.1.2 counter name "ipsec_out"
For unknown reasons, COUNTER scope is not closed before parsing 'daddr' which is not recognized in that scope.
This series adds a test case in patch 1 and a workaround in patch 2, namely moving saddr/daddr keywords back to global scope. Eliminating the whole COUNTER scope would also work, but is neither a real solution.
The fact that a scope closed three words ago still causes trouble proves the concept is flawed. IMO one should abandon it and instead deploy quoting of all user-defined strings on output and consequently allow all user-defined strings to be quoted on input.
Phil Sutter (2):
tests/py: Add a test for failing ipsec after counter Revert "scanner: remove saddr/daddr from initial state"
src/scanner.l | 6 ++---- tests/py/inet/ipsec.t | 2 ++ tests/py/inet/ipsec.t.json | 21 +++++++++++++++++++++ tests/py/inet/ipsec.t.payload | 6 ++++++ 4 files changed, 31 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1