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 | 2d243bbeac37b2bf63dedb88588d7e7da9c0db26 (patch) | |
tree | 4725a9e5bf24107fb197c0364d9827cc302f6449 /lib | |
parent | 7d458a04ac55477a73cdea192d9f8e95cdb47a5c (diff) |
lib.krebs.genipv6: make net addresses 128 bit long
Diffstat (limited to 'lib')
-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 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; |