Comments
Patch
@@ -2231,10 +2231,10 @@ __nft_rule_check(struct nft_handle *h, const char *chain, const char *table,
if (rulenum >= 0) {
/* Delete by rule number case */
- if (rule_ctr != rulenum) {
- rule_ctr++;
+ if (rule_ctr != rulenum)
goto next;
- }
+ found = true;
+ break;
} else {
/* Delete by matching rule case */
DEBUGP("comparing with... ");
@@ -2266,6 +2266,7 @@ __nft_rule_check(struct nft_handle *h, const char *chain, const char *table,
break;
}
next:
+ rule_ctr++;
r = nft_rule_list_iter_next(iter);
}
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> --- iptables/nft.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)