summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index a2c43e83..0249cbbe 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -2199,6 +2199,9 @@ static int __nft_rule_del(struct nft_handle *h, struct nftnl_rule *r)
nftnl_rule_list_del(r);
+ if (!nftnl_rule_get_u64(r, NFTNL_RULE_HANDLE))
+ nftnl_rule_set_u32(r, NFTNL_RULE_ID, ++h->rule_id);
+
obj = batch_rule_add(h, NFT_COMPAT_RULE_DELETE, r);
if (!obj) {
nftnl_rule_free(r);