summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-12-11 22:47:27 +0100
committertv <tv@krebsco.de>2018-12-11 22:47:27 +0100
commitb6e1cef6a5d0235a049b8d7606ebf053d8ab1516 (patch)
tree76474475f08e6c5549a7560c8030259e044f934a
parentfacbcdafc891094fa62857089b13fcc9926a4485 (diff)
lib.normalize-ip6-addr: only normalize addrs w/o ::
-rw-r--r--lib/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 54597e5fd..e352c7be9 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -107,7 +107,11 @@ let
in
a: concatStringsSep ":" (map f (splitString ":" a));
in
- a: toLower (group-zeros (drop-leading-zeros a));
+ a:
+ toLower
+ (if test ".*::.*" a
+ then a
+ else group-zeros (drop-leading-zeros a));
};
in