From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft 3/3] netlink: add size description for constant sets
Date: Wed, 24 May 2017 11:53:18 +0200 [thread overview]
Message-ID: <1495619598-22759-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1495619598-22759-1-git-send-email-pablo@netfilter.org>
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(+)
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);
--
2.1.4
prev parent reply other threads:[~2017-05-24 9:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 9:53 [PATCH nft 1/3] rule: adjust set expression size accordingly with intervals Pablo Neira Ayuso
2017-05-24 9:53 ` [PATCH nft 2/3] segtree: reset element size counter before adding intervals to set Pablo Neira Ayuso
2017-05-24 9:53 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495619598-22759-3-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).