nft: adapt nft_rule_expr_get to use uint32_t instead of size_t
According to libnftables change 437d610, now the length obtained
via getter function is uint32_t, not size_t anymore.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
index acf352d..5c09fe1 100644
--- a/iptables/nft-shared.c
+++ b/iptables/nft-shared.c
@@ -223,7 +223,7 @@
{
uint32_t value;
const void *ifname;
- size_t len;
+ uint32_t len;
switch(key) {
case NFT_META_IIF:
@@ -285,7 +285,7 @@
void nft_parse_target(struct nft_rule_expr *e, struct nft_rule_expr_iter *iter,
int family, void *data)
{
- size_t tg_len;
+ uint32_t tg_len;
const char *targname = nft_rule_expr_get_str(e, NFT_EXPR_TG_NAME);
const void *targinfo = nft_rule_expr_get(e, NFT_EXPR_TG_INFO, &tg_len);
struct xtables_target *target;
@@ -316,7 +316,7 @@
nft_parse_match(struct nft_rule_expr *e, struct nft_rule_expr_iter *iter,
struct iptables_command_state *cs)
{
- size_t mt_len;
+ uint32_t mt_len;
const char *mt_name = nft_rule_expr_get_str(e, NFT_EXPR_MT_NAME);
const void *mt_info = nft_rule_expr_get(e, NFT_EXPR_MT_INFO, &mt_len);
struct xtables_match *match;
@@ -360,7 +360,7 @@
{
struct nft_rule_expr *e;
const char *name;
- size_t len;
+ uint32_t len;
uint8_t op;
e = nft_rule_expr_iter_next(iter);