pmcf 1.46.1 → 1.46.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.46.1",
3
+ "version": "1.46.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/host.mjs CHANGED
@@ -376,12 +376,10 @@ export class NetworkInterface extends Base {
376
376
  }
377
377
 
378
378
  addSubnet(address) {
379
- if(hasWellKnownSubnet(address)) {
380
- return;
381
- }
382
-
383
379
  if (!this.network) {
384
- this.error("Missing network", address);
380
+ if (!hasWellKnownSubnet(address)) {
381
+ this.error("Missing network", address);
382
+ }
385
383
  } else {
386
384
  return this.network.addSubnet(address);
387
385
  }
package/src/utils.mjs CHANGED
@@ -167,7 +167,7 @@ export function normalizeCIDR(address) {
167
167
  export function hasWellKnownSubnet(address)
168
168
  {
169
169
  const n = encodeIP(address);
170
- return n === IPV4_LOCALHOST || n === IPV6_LOCALHOST;
170
+ return n === IPV4_LOCALHOST || n === IPV6_LOCALHOST || isLinkLocal(address);
171
171
  }
172
172
 
173
173
  const IPV4_LOCALHOST = _encode(ipv4, "127.0.0.1");
package/types/utils.d.mts CHANGED
@@ -23,4 +23,4 @@ export function normalizeCIDR(address: any): {
23
23
  prefixLength: any;
24
24
  cidr: string;
25
25
  };
26
- export function hasWellKnownSubnet(address: any): boolean;
26
+ export function hasWellKnownSubnet(address: any): any;