From 22d6c97855b99e770855474f394cd4a3192d98d9 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 16 Sep 2016 09:47:36 +0200 Subject: unbound service: extend isLocalAddress to handle ipv6 --- nixos/modules/services/networking/unbound.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/services/networking/unbound.nix') diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix index 828b8e17556..6375ebee320 100644 --- a/nixos/modules/services/networking/unbound.nix +++ b/nixos/modules/services/networking/unbound.nix @@ -12,7 +12,7 @@ let interfaces = concatMapStrings (x: " interface: ${x}\n") cfg.interfaces; - isLocalAddress = x: substring 0 9 x == "127.0.0.1"; + isLocalAddress = x: substring 0 3 x == "::1" || substring 0 9 x == "127.0.0.1"; forward = optionalString (any isLocalAddress cfg.forwardAddresses) '' -- cgit 1.4.1