From 61428af7486defec6adafc9b6a2ee0602fd98b48 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 26 May 2017 11:49:19 +0100 Subject: netlink: add size description for constant sets The kernel side can make better decisions with this information when selecting the right backend, so add this information to the set netlink message. Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/netlink.c') diff --git a/src/netlink.c b/src/netlink.c index 59e8918d..28821903 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -1293,6 +1293,8 @@ static int netlink_add_set_batch(struct netlink_ctx *ctx, if (set->desc.size != 0) nftnl_set_set_u32(nls, NFTNL_SET_DESC_SIZE, set->desc.size); + } else if (set->init) { + nftnl_set_set_u32(nls, NFTNL_SET_DESC_SIZE, set->init->size); } udbuf = nftnl_udata_buf_alloc(NFT_USERDATA_MAXLEN); -- cgit v1.2.3