summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-02 17:05:13 +0200
committerFlorian Westphal <fw@strlen.de>2018-08-04 14:15:17 +0200
commitf7bbdb0091f2c2baf43bb1c14715bc850181a021 (patch)
treea204e4dabe5b2fae2337980c91ffa0e32ba85608 /iptables/nft.c
parentae574b2b882e84c1081706c8386e83e468e622f6 (diff)
xtables: Use correct built-in chain count
In nft_chain_builtin_init(), The wrong macro was used for iterating over the built-in chains of a given table. That array's length is defined using NF_INET_NUMHOOKS, not NF_IP_NUMHOOKS. Though this change is rather cosmetic since both macros resolve into the same value. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 05cd1564..f483eb6f 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -675,7 +675,7 @@ static void nft_chain_builtin_init(struct nft_handle *h,
struct nftnl_chain *c;
/* Initialize built-in chains if they don't exist yet */
- for (i=0; i<NF_IP_NUMHOOKS && table->chains[i].name != NULL; i++) {
+ for (i=0; i < NF_INET_NUMHOOKS && table->chains[i].name != NULL; i++) {
c = nft_chain_list_find(list, table->name,
table->chains[i].name);