lib.krebs.genipv6: make net addresses 128 bit long
This commit is contained in:
parent
7d458a04ac
commit
2d243bbeac
@ -12,7 +12,7 @@ let {
|
|||||||
|
|
||||||
inherit netname;
|
inherit netname;
|
||||||
netCIDR = "${netAddress}/${toString netPrefixLength}";
|
netCIDR = "${netAddress}/${toString netPrefixLength}";
|
||||||
netAddress = appendZeros netPrefixLength netPrefix;
|
netAddress = appendZeros addressLength netPrefix;
|
||||||
netHash = toString {
|
netHash = toString {
|
||||||
retiolum = 0;
|
retiolum = 0;
|
||||||
wirelum = 1;
|
wirelum = 1;
|
||||||
@ -25,7 +25,7 @@ let {
|
|||||||
|
|
||||||
inherit subnetname;
|
inherit subnetname;
|
||||||
subnetCIDR = "${subnetAddress}/${toString subnetPrefixLength}";
|
subnetCIDR = "${subnetAddress}/${toString subnetPrefixLength}";
|
||||||
subnetAddress = appendZeros subnetPrefixLength subnetPrefix;
|
subnetAddress = appendZeros addressLength subnetPrefix;
|
||||||
subnetHash = hashToLength 4 subnetname;
|
subnetHash = hashToLength 4 subnetname;
|
||||||
subnetPrefix = joinAddress netPrefix subnetHash;
|
subnetPrefix = joinAddress netPrefix subnetHash;
|
||||||
subnetPrefixLength = netPrefixLength + 16;
|
subnetPrefixLength = netPrefixLength + 16;
|
||||||
|
Loading…
Reference in New Issue
Block a user