mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-13 12:33:27 +02:00
fix(nix): false-positive in the mkPortList function
This function is used to: 1. open firewall ports for configured CLAs 2. check for misconfigurations caused by duplicate ports However, there was a logical issue that caused false-positives. Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
This commit is contained in:
parent
ec85079205
commit
29852c83f9
1 changed files with 1 additions and 4 deletions
|
|
@ -196,10 +196,7 @@ let
|
|||
|
||||
mkPortList =
|
||||
_: cfg:
|
||||
|
||||
(lib.attrsets.mapAttrsToList (_: cla: (lib.mkIf cfg.enable cla.port)) (
|
||||
lib.attrsets.filterAttrs (_: v: v ? "port") cfg.cla
|
||||
));
|
||||
lib.mapAttrsToList (_: cla: cla.port) (lib.filterAttrs (_: cla: cla.enable && cla ? port) cfg.cla);
|
||||
|
||||
mkNetworkingConfig = _: cfg: {
|
||||
firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall (mkPortList _ cfg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue