summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 61bed525..48198edf 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -3195,14 +3195,7 @@ bool nft_is_table_compatible(struct nft_handle *h, const char *tablename)
struct nftnl_rule *rule;
int ret = 0, i;
- for (i = 0; i < TABLES_MAX; i++) {
- if (!h->tables[i].name)
- continue;
- if (strcmp(h->tables[i].name, tablename) == 0)
- break;
- }
-
- if (i == TABLES_MAX)
+ if (!nft_table_builtin_find(h, tablename))
return false;
ret = nft_are_chains_compatible(h, tablename);