diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-11-03 12:20:07 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:20 +0100 |
commit | 1298a1014bc14c45de50cc242779dfa382c456c9 (patch) | |
tree | fed3cb73607914ba9d5c075d7dffde222adad703 /iptables/nft.c | |
parent | 3aea037f359795edeb69426e2dde63c59540ba5f (diff) |
iptables: nft: use 64-bits handle
Now that we use that in kernel space and in libnftables.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r-- | iptables/nft.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/iptables/nft.c b/iptables/nft.c index 123a479c..8e2b5acd 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -649,7 +649,7 @@ static void add_counters(struct nft_rule *r, uint64_t packets, uint64_t bytes) int nft_rule_add(struct nft_handle *h, const char *chain, const char *table, struct iptables_command_state *cs, - bool append, uint16_t handle, bool verbose) + bool append, uint64_t handle, bool verbose) { char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; @@ -2409,11 +2409,12 @@ int nft_rule_replace(struct nft_handle *h, const char *chain, r = nft_rule_find(list, chain, table, cs, rulenum); if (r != NULL) { - DEBUGP("replacing rule with handle=%u\n", - nft_rule_attr_get_u16(r, NFT_RULE_ATTR_HANDLE)); + DEBUGP("replacing rule with handle=%llu\n", + (unsigned long long) + nft_rule_attr_get_u64(r, NFT_RULE_ATTR_HANDLE)); ret = nft_rule_add(h, chain, table, cs, true, - nft_rule_attr_get_u16(r, NFT_RULE_ATTR_HANDLE), + nft_rule_attr_get_u64(r, NFT_RULE_ATTR_HANDLE), verbose); } else errno = ENOENT; |