1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

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 2020-12-17 12:52:53 +01:00
parent 48ed276647
commit f4fca22ad4

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;
}