diff options
author | tv <tv@krebsco.de> | 2018-12-14 20:02:17 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2018-12-14 20:02:17 +0100 |
commit | 32e011699156c6132a2a0bc95cbe36d572c571ac (patch) | |
tree | a278e9029ae783bbeca3da13be2747b264fad352 /lib/krebs | |
parent | ca73242cda966672b314a7378652bf8294a512e5 (diff) |
lib.krebs.genipv6: make net addresses 128 bit long
Diffstat (limited to 'lib/krebs')
-rw-r--r-- | lib/krebs/genipv6.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/krebs/genipv6.nix b/lib/krebs/genipv6.nix index af1df6d..b4806e1 100644 --- a/lib/krebs/genipv6.nix +++ b/lib/krebs/genipv6.nix @@ -12,7 +12,7 @@ let { inherit netname; netCIDR = "${netAddress}/${toString netPrefixLength}"; - netAddress = appendZeros netPrefixLength netPrefix; + netAddress = appendZeros addressLength netPrefix; netHash = toString { retiolum = 0; wirelum = 1; @@ -25,7 +25,7 @@ let { inherit subnetname; subnetCIDR = "${subnetAddress}/${toString subnetPrefixLength}"; - subnetAddress = appendZeros subnetPrefixLength subnetPrefix; + subnetAddress = appendZeros addressLength subnetPrefix; subnetHash = hashToLength 4 subnetname; subnetPrefix = joinAddress netPrefix subnetHash; subnetPrefixLength = netPrefixLength + 16; |