firewall-util-nft: clear previous address on replay

In case external entity wiped the ruleset, we need to clear the
'previous' address -- its already gone.

This prevents the transaction from succeeding: the delete operation fails.
This commit is contained in:
Florian Westphal
2021-01-19 16:38:56 +01:00
parent 48ed276647
commit f4fca22ad4
+2
View File
@@ -1062,6 +1062,8 @@ again:
int tmp = fw_nftables_recreate_table(ctx->nfnl, af, transaction, tsize);
if (tmp == 0) {
/* table created anew; previous address already gone */
previous_remote = NULL;
retry = false;
goto again;
}