pmcf 1.43.1 → 1.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils.mjs +5 -1
package/package.json
CHANGED
package/src/utils.mjs
CHANGED
|
@@ -147,6 +147,9 @@ export function normalizeCIDR(address) {
|
|
|
147
147
|
if (n === IPV4_LOCALHOST) {
|
|
148
148
|
prefixLength = 8;
|
|
149
149
|
prefix = _decode(definition, n, prefixLength);
|
|
150
|
+
} else if (n === IPV6_LOCALHOST) {
|
|
151
|
+
prefixLength = 127;
|
|
152
|
+
prefix = _decode(definition, n, prefixLength);
|
|
150
153
|
} else {
|
|
151
154
|
return {};
|
|
152
155
|
}
|
|
@@ -156,4 +159,5 @@ export function normalizeCIDR(address) {
|
|
|
156
159
|
return { prefix, prefixLength, cidr: `${prefix}/${prefixLength}` };
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
const IPV4_LOCALHOST = _encode(ipv4,
|
|
162
|
+
const IPV4_LOCALHOST = _encode(ipv4, "127.0.0.1");
|
|
163
|
+
const IPV6_LOCALHOST = _encode(ipv6, "::1");
|