networking/nftables: only delete our tables if flushRuleset is set to false
This commit is contained in:
parent
d5a0826686
commit
5f300ad70c
1 changed files with 5 additions and 1 deletions
|
@ -248,7 +248,11 @@ in
|
|||
RemainAfterExit = true;
|
||||
ExecStart = rulesScript;
|
||||
ExecReload = rulesScript;
|
||||
ExecStop = "${pkgs.nftables}/bin/nft flush ruleset";
|
||||
ExecStop = "${pkgs.nftables}/bin/nft ${
|
||||
if cfg.flushRuleset then "flush ruleset"
|
||||
else escapeShellArg (concatStringsSep "; " (
|
||||
mapAttrsToList (_: table: "delete table ${table.family} ${table.name}") enabledTables
|
||||
))}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue