unbound service: extend isLocalAddress to handle ipv6

This commit is contained in:
Joachim Fasting 2016-09-16 09:47:36 +02:00
parent bf538515b7
commit 22d6c97855
No known key found for this signature in database
GPG key ID: 7544761007FE4E08

View file

@ -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) ''