summaryrefslogtreecommitdiffstats
path: root/lib/krebs/genipv6.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-12-14 20:02:17 +0100
committertv <tv@krebsco.de>2018-12-14 20:02:17 +0100
commit2d243bbeac37b2bf63dedb88588d7e7da9c0db26 (patch)
tree4725a9e5bf24107fb197c0364d9827cc302f6449 /lib/krebs/genipv6.nix
parent7d458a04ac55477a73cdea192d9f8e95cdb47a5c (diff)
lib.krebs.genipv6: make net addresses 128 bit long
Diffstat (limited to 'lib/krebs/genipv6.nix')
-rw-r--r--lib/krebs/genipv6.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/krebs/genipv6.nix b/lib/krebs/genipv6.nix
index af1df6d0e..b4806e156 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;