[nft PATCH 0/2] parser_json: fix JSON delete of ct stateful objects
Gergely Palotas <[email protected]>
| Newsgroups | gmane.comp.security.firewalls.netfilter.devel |
|---|---|
| Message-ID | <[email protected]> |
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