diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-04-24 23:17:50 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-04-24 23:36:50 +0200 |
commit | fd595286a68e2c676657d4ac753da517a4d0c3a2 (patch) | |
tree | 9248944d8186bf15cb3dfe626791365280bcdccd /tests/shell/testcases/chains/0016delete_handle_0 | |
parent | c88494c5fb4dc275f94df27f1f68996fd3925680 (diff) |
json: allow to specify comment on table
Allow users to add a comment when declaring a table:
# sudo nft add table inet test3 '{comment "this is a comment";}'
# nft list ruleset
table inet test3 {
comment "this is a comment"
}
# nft -j list ruleset
{"nftables": [{"metainfo": {"version": "1.0.7", "release_name": "Old Doc Yak", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "test3", "handle": 3, "comment": "this is a comment"}}]}
# nft -j list ruleset > test.json
# nft flush ruleset
# nft -j -f test.json
# nft -j list ruleset
{"nftables": [{"metainfo": {"version": "1.0.7", "release_name": "Old Doc Yak", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "test3", "handle": 4, "comment": "this is a comment"}}]}
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1670
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/chains/0016delete_handle_0')
0 files changed, 0 insertions, 0 deletions