All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH 0/2] parser_json: fix JSON delete of ct stateful objects
@ 2026-08-11 13:43 Gergely Palotas
  2026-08-11 13:43 ` [nft PATCH 1/2] parser_json: fix CMD_OBJ/NFT_OBJECT mismatch in delete path Gergely Palotas
  2026-08-11 13:43 ` [nft PATCH 2/2] tests: shell: add JSON delete test for ct stateful objects Gergely Palotas
  0 siblings, 2 replies; 4+ messages in thread
From: Gergely Palotas @ 2026-08-11 13:43 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Gergely Palotas

JSON delete commands for ct timeout, ct expectation and tunnel stateful
objects have been broken since their introduction. The dispatch tables
passed NFT_OBJECT_* kernel constants where enum cmd_obj values were
expected, causing the delete path to send the wrong netlink message type
to the kernel (e.g. "delete chain" instead of "delete ct timeout"),
which returned EINVAL.

Patch 1 fixes the mismatch by using CMD_OBJ_* constants consistently
throughout the affected dispatch tables and the function itself.
Patch 2 adds a regression test covering JSON add and delete for all
three affected object types.

Gergely Palotas (2):
  parser_json: fix CMD_OBJ/NFT_OBJECT mismatch in delete path
  tests: shell: add JSON delete test for ct stateful objects

 src/parser_json.c                             |  34 ++---
 .../json/0009json_delete_ct_objects_0         | 140 ++++++++++++++++++
 2 files changed, 155 insertions(+), 19 deletions(-)
 create mode 100755 tests/shell/testcases/json/0009json_delete_ct_objects_0

-- 
2.47.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-20 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 13:43 [nft PATCH 0/2] parser_json: fix JSON delete of ct stateful objects Gergely Palotas
2026-08-11 13:43 ` [nft PATCH 1/2] parser_json: fix CMD_OBJ/NFT_OBJECT mismatch in delete path Gergely Palotas
2026-08-20 11:48   ` Pablo Neira Ayuso
2026-08-11 13:43 ` [nft PATCH 2/2] tests: shell: add JSON delete test for ct stateful objects Gergely Palotas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.