From d12dd340b61b331653c3e166059121a51f906152 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 18 Sep 2012 17:20:46 -0400 Subject: [PATCH] firewall.nix: Respect networking.enableIPv6 = false Reported-by: Pablo Costa --- modules/services/networking/firewall.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/networking/firewall.nix b/modules/services/networking/firewall.nix index 64cfcef124a..a72ba796773 100644 --- a/modules/services/networking/firewall.nix +++ b/modules/services/networking/firewall.nix @@ -33,7 +33,9 @@ let # Helper command to manipulate both the IPv4 and IPv6 tables. ip46tables() { iptables "$@" - ip6tables "$@" + ${optionalString config.networking.enableIPv6 '' + ip6tables "$@" + ''} } '';