]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: adapt nft_rule_expr_get to use uint32_t instead of size_t
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 19 Sep 2013 18:46:42 +0000 (20:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:48 +0000 (23:50 +0100)
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>
iptables/nft-shared.c

index acf352d62aafc221a4a3e2cfe52204ac7e97f7d1..5c09fe1d3d361a13c48079c86ae928b1d05aa71d 100644 (file)
@@ -223,7 +223,7 @@ void parse_meta(struct nft_rule_expr *e, uint8_t key, char *iniface,
 {
        uint32_t value;
        const void *ifname;
-       size_t len;
+       uint32_t len;
 
        switch(key) {
        case NFT_META_IIF:
@@ -285,7 +285,7 @@ void parse_meta(struct nft_rule_expr *e, uint8_t key, char *iniface,
 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 @@ static void
 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 @@ void get_cmp_data(struct nft_rule_expr_iter *iter,
 {
        struct nft_rule_expr *e;
        const char *name;
-       size_t len;
+       uint32_t len;
        uint8_t op;
 
        e = nft_rule_expr_iter_next(iter);