Skip to content

Fix for failing 'counter ipsec ...' rule

Phil Sutter netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tests/py: Add a test for failing ipsec after countertests/py/inet/ipsec.t tests/py/inet/ipsec.t.json tests/py/inet/ipsec.t.payload+29 -00 replies
2/2Revert "scanner: remove saddr/daddr from initial state"src/scanner.l+2 -43 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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