summary refs log tree commit diff
path: root/nixos/modules/services/networking/firewall.nix
diff options
context:
space:
mode:
authorBen Blaxill <ben.blaxill@gmail.com>2018-11-22 19:24:23 -0500
committerBen Blaxill <ben.blaxill@gmail.com>2018-11-22 19:24:23 -0500
commit308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e (patch)
treececdb41f6de506e44acac9e6d5a469ab3f77269f /nixos/modules/services/networking/firewall.nix
parentb48c6d051bc621a8f4fe5f5ebf2a846c97dfa971 (diff)
downloadnixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar.gz
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar.bz2
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar.lz
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar.xz
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.tar.zst
nixpkgs-308ab4ea25f7d6368ba5b7713fa4ef82cdf8e95e.zip
Rename back to default and better release notes
Diffstat (limited to 'nixos/modules/services/networking/firewall.nix')
-rw-r--r--nixos/modules/services/networking/firewall.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index 9d5d9cfc87b..aba64e4f60f 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -58,8 +58,8 @@ let
     ${text}
   ''; in "${dir}/bin/${name}";
 
-  anyInterface = { any = mapAttrs (name: value: cfg."${name}") commonOptions; };
-  allInterfaces = anyInterface // cfg.interfaces;
+  defaultInterface = { default = mapAttrs (name: value: cfg."${name}") commonOptions; };
+  allInterfaces = defaultInterface // cfg.interfaces;
 
   startScript = writeShScript "firewall-start" ''
     ${helpers}
@@ -154,7 +154,7 @@ let
     ${concatStrings (mapAttrsToList (iface: cfg:
       concatMapStrings (port:
         ''
-          ip46tables -A nixos-fw -p tcp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "any") "-i ${iface}"}
+          ip46tables -A nixos-fw -p tcp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"}
         ''
       ) cfg.allowedTCPPorts
     ) allInterfaces)}
@@ -164,7 +164,7 @@ let
       concatMapStrings (rangeAttr:
         let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in
         ''
-          ip46tables -A nixos-fw -p tcp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "any") "-i ${iface}"}
+          ip46tables -A nixos-fw -p tcp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"}
         ''
       ) cfg.allowedTCPPortRanges
     ) allInterfaces)}
@@ -173,7 +173,7 @@ let
     ${concatStrings (mapAttrsToList (iface: cfg:
       concatMapStrings (port:
         ''
-          ip46tables -A nixos-fw -p udp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "any") "-i ${iface}"}
+          ip46tables -A nixos-fw -p udp --dport ${toString port} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"}
         ''
       ) cfg.allowedUDPPorts
     ) allInterfaces)}
@@ -183,7 +183,7 @@ let
       concatMapStrings (rangeAttr:
         let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in
         ''
-          ip46tables -A nixos-fw -p udp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "any") "-i ${iface}"}
+          ip46tables -A nixos-fw -p udp --dport ${range} -j nixos-fw-accept ${optionalString (iface != "default") "-i ${iface}"}
         ''
       ) cfg.allowedUDPPortRanges
     ) allInterfaces)}