lib.krebs.genipv6: normalize net addresses
This commit is contained in:
parent
2d243bbeac
commit
ede763d77a
@ -12,7 +12,8 @@ let {
|
|||||||
|
|
||||||
inherit netname;
|
inherit netname;
|
||||||
netCIDR = "${netAddress}/${toString netPrefixLength}";
|
netCIDR = "${netAddress}/${toString netPrefixLength}";
|
||||||
netAddress = appendZeros addressLength netPrefix;
|
netAddress =
|
||||||
|
normalize-ip6-addr (appendZeros addressLength netPrefix);
|
||||||
netHash = toString {
|
netHash = toString {
|
||||||
retiolum = 0;
|
retiolum = 0;
|
||||||
wirelum = 1;
|
wirelum = 1;
|
||||||
@ -25,7 +26,8 @@ let {
|
|||||||
|
|
||||||
inherit subnetname;
|
inherit subnetname;
|
||||||
subnetCIDR = "${subnetAddress}/${toString subnetPrefixLength}";
|
subnetCIDR = "${subnetAddress}/${toString subnetPrefixLength}";
|
||||||
subnetAddress = appendZeros addressLength subnetPrefix;
|
subnetAddress =
|
||||||
|
normalize-ip6-addr (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