ip-utilties 1.4.0 → 1.4.1
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/ip.mjs +5 -1
package/package.json
CHANGED
package/src/ip.mjs
CHANGED
|
@@ -229,6 +229,10 @@ export function normalizeCIDR(address) {
|
|
|
229
229
|
prefix = "fe80::";
|
|
230
230
|
longPrefix = prefix;
|
|
231
231
|
prefixLength = 64;
|
|
232
|
+
} else if (isUniqueLocal(address)) {
|
|
233
|
+
prefix = "fd00::";
|
|
234
|
+
longPrefix = prefix;
|
|
235
|
+
prefixLength = 7;
|
|
232
236
|
} else {
|
|
233
237
|
const family = /*_family(prefix); */ isIPv6(prefix) ? ipv6 : ipv4;
|
|
234
238
|
let n;
|
|
@@ -302,7 +306,7 @@ export function isUniqueLocal(address) {
|
|
|
302
306
|
}
|
|
303
307
|
|
|
304
308
|
export function hasWellKnownSubnet(address) {
|
|
305
|
-
return isLocalhost(address) || isLinkLocal(address);
|
|
309
|
+
return isLocalhost(address) || isLinkLocal(address) || isUniqueLocal(address);
|
|
306
310
|
}
|
|
307
311
|
|
|
308
312
|
export const IPV6_LINK_LOCAL_BROADCAST = _encode(ipv6, "ff02::1");
|