This patch series enables userdata for objects. Initially used to store comments, can be extended for other use cases in the future. There is a new API version for libnftnl as it did not export a necessary function, nftnl_obj_get_data, to support getting object data. nf-next: netfilter: nf_tables: add userdata support for nft_object include/net/netfilter/nf_tables.h | 2 ++ include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 39 +++++++++++++++++++----- 3 files changed, 35 insertions(+), 8 deletions(-) libnftnl: object: add userdata and comment support include/libnftnl/object.h | 1 + include/libnftnl/udata.h | 6 ++++++ include/linux/netfilter/nf_tables.h | 2 ++ include/obj.h | 5 +++++ src/libnftnl.map | 4 ++++ src/object.c | 26 ++++++++++++++++++++++++++ 6 files changed, 44 insertions(+) nftables: src: add comment support for objects include/rule.h | 1 + src/mnl.c | 12 +++++ src/netlink.c | 31 +++++++++++++ src/parser_bison.y | 40 +++++++++++++++++ src/rule.c | 20 +++++++++ .../testcases/optionals/comments_objects_0 | 44 +++++++++++++++++++ .../optionals/dumps/comments_objects_0.nft | 37 ++++++++++++++++ 7 files changed, 185 insertions(+) create mode 100755 tests/shell/testcases/optionals/comments_objects_0 create mode 100644 tests/shell/testcases/optionals/dumps/comments_objects_0.nft -- 2.27.0