From 8499d7555fff04594f58267858258d714fe5c6e5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Oct 2012 11:28:30 -0400 Subject: [PATCH] =?UTF-8?q?Backward=20compatibility=20hack=20for=20?= =?UTF-8?q?=E2=80=98networking.nat.internalIPs=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/services/networking/nat.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/services/networking/nat.nix b/modules/services/networking/nat.nix index ff6ff02f7e9..9d62a764f06 100644 --- a/modules/services/networking/nat.nix +++ b/modules/services/networking/nat.nix @@ -34,6 +34,9 @@ in coming from these networks and destined for the external interface will be rewritten. ''; + # Backward compatibility: this used to be a single range instead + # of a list. + apply = x: if isList x then x else [x]; }; networking.nat.externalInterface = mkOption { @@ -78,8 +81,8 @@ in '' iptables -t nat -F POSTROUTING iptables -t nat -X - '' - + (concatMapStrings (network: + '' + + (concatMapStrings (network: '' iptables -t nat -A POSTROUTING \ -s ${network} -o ${cfg.externalInterface} \