Message ID | 1495619598-22759-3-git-send-email-pablo@netfilter.org |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
diff --git a/src/netlink.c b/src/netlink.c index 59e8918d2ba0..28821903f18c 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);
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 <pablo@netfilter.org> --- src/netlink.c | 2 ++ 1 file changed, 2 insertions(+)