This patch breaks looping in nft_chain_user_del, nft_chain_zero_counters
and nft_rule_flush after the chain is found.
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
__nft_rule_flush(h, table_name, chain_name);
+ if (chain != NULL)
+ break;
next:
c = nft_chain_list_iter_next(iter);
}
break;
deleted_ctr++;
+
+ if (chain != NULL)
+ break;
next:
c = nft_chain_list_iter_next(iter);
}
if (ret < 0)
perror("mnl_talk:nft_chain_zero_counters");
+ if (chain != NULL)
+ break;
next:
c = nft_chain_list_iter_next(iter);
}