summary refs log tree commit diff
path: root/nixos/modules/services/networking/unbound.nix
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-09-16 09:47:36 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-09-16 09:47:36 +0200
commit22d6c97855b99e770855474f394cd4a3192d98d9 (patch)
tree756697e3d17bbb2e99c1f169041ef5e5e4daf657 /nixos/modules/services/networking/unbound.nix
parentbf538515b7d668f9522b1db7d07ffe087f9d8a7f (diff)
downloadnixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar.gz
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar.bz2
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar.lz
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar.xz
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.tar.zst
nixpkgs-22d6c97855b99e770855474f394cd4a3192d98d9.zip
unbound service: extend isLocalAddress to handle ipv6
Diffstat (limited to 'nixos/modules/services/networking/unbound.nix')
-rw-r--r--nixos/modules/services/networking/unbound.nix2
1 files changed, 1 insertions, 1 deletions
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) ''