From 05fcf8013def5274e0a66d16b44f34d39b31d594 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Sun, 11 Sep 2022 00:11:14 +0200 Subject: json: add stateful object comment support When listing a stateful object with JSON support, the comment was ignored. Output example: { "counter": { "family": "inet", "name": "mycounter", "table": "t", "handle": 1, "comment": "my comment in counter", "packets": 0, "bytes": 0 } } Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1611 Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/json/dumps/0006obj_comment_0.nft | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/shell/testcases/json/dumps/0006obj_comment_0.nft (limited to 'tests/shell/testcases/json/dumps/0006obj_comment_0.nft') diff --git a/tests/shell/testcases/json/dumps/0006obj_comment_0.nft b/tests/shell/testcases/json/dumps/0006obj_comment_0.nft new file mode 100644 index 00000000..e52b21b4 --- /dev/null +++ b/tests/shell/testcases/json/dumps/0006obj_comment_0.nft @@ -0,0 +1,6 @@ +table inet t { + counter mycounter { + comment "my comment in counter" + packets 0 bytes 0 + } +} -- cgit v1.2.3