chain = nftnl_chain_list_iter_next(iter);
while (chain != NULL) {
- if (!nft_chain_builtin(chain))
+ const char *table = nftnl_chain_get(chain, NFTNL_CHAIN_TABLE);
+
+ if (!nft_chain_builtin(chain) ||
+ !nft_is_table_compatible(h, table))
goto next;
ret = nft_is_chain_compatible(h, chain);
rule = nftnl_rule_list_iter_next(iter);
while (rule != NULL) {
+ if (!nft_is_table_compatible(h,
+ nftnl_rule_get_str(rule, NFTA_RULE_TABLE)))
+ goto next;
+
ret = nft_is_rule_compatible(rule);
if (ret != 0)
break;
-
+next:
rule = nftnl_rule_list_iter_next(iter);
}