From: Pablo Neira Ayuso Date: Fri, 26 May 2017 10:49:19 +0000 (+0100) Subject: netlink: add size description for constant sets X-Git-Tag: v0.8~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61428af7486defec6adafc9b6a2ee0602fd98b48;p=thirdparty%2Fnftables.git 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 --- 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);