mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 17:53:14 +00:00
networking/nftables: only delete our tables if flushRuleset is set to false
This commit is contained in:
parent
d5a0826686
commit
5f300ad70c
@ -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 New Issue
Block a user