pmcf 3.8.16 → 3.8.18
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
|
@@ -101,9 +101,12 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
get gatewayAddress() {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
const gateway = this.gateway;
|
|
105
|
+
if (gateway) {
|
|
106
|
+
for (const a of gateway.networkAddresses()) {
|
|
107
|
+
if (a.networkInterface.network === this.network) {
|
|
108
|
+
return a.address;
|
|
109
|
+
}
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
@@ -208,7 +211,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
208
211
|
|
|
209
212
|
const routeSectionExtra = this.destination
|
|
210
213
|
? { Destination: this.destination }
|
|
211
|
-
: { Gateway: this.gatewayAddress };
|
|
214
|
+
: this.gateway ? { Gateway: this.gatewayAddress } : {};
|
|
212
215
|
|
|
213
216
|
const networkSectionExtra = this.arpbridge
|
|
214
217
|
? {
|
package/src/services/kea.mjs
CHANGED
|
@@ -402,7 +402,8 @@ export class KeaService extends Service {
|
|
|
402
402
|
endpoint.type === "dhcp" &&
|
|
403
403
|
endpoint.family === family &&
|
|
404
404
|
endpoint.networkInterface.kind !== "loopback" &&
|
|
405
|
-
endpoint.networkInterface.kind !== "wlan"
|
|
405
|
+
endpoint.networkInterface.kind !== "wlan" &&
|
|
406
|
+
endpoint.networkInterface.kind !== "tun"
|
|
406
407
|
).map(
|
|
407
408
|
endpoint => `${endpoint.networkInterface.name}/${endpoint.address}`
|
|
408
409
|
);
|
|
@@ -411,7 +412,7 @@ export class KeaService extends Service {
|
|
|
411
412
|
s => s !== SUBNET_LOCALHOST_IPV4 && s !== SUBNET_LOCALHOST_IPV6
|
|
412
413
|
);
|
|
413
414
|
|
|
414
|
-
const pools =
|
|
415
|
+
const pools = subnet => {
|
|
415
416
|
return subnet.dhcpPools.map(pool => {
|
|
416
417
|
return { pool: Array.isArray(pool) ? pool.join(" - ") : pool };
|
|
417
418
|
});
|
|
@@ -421,7 +422,9 @@ export class KeaService extends Service {
|
|
|
421
422
|
Dhcp4: {
|
|
422
423
|
...(await commonConfig("4")),
|
|
423
424
|
subnet4: subnets
|
|
424
|
-
.filter(s => s.family === "IPv4"
|
|
425
|
+
.filter(s => s.family === "IPv4" &&
|
|
426
|
+
// TODO keep out tailscale
|
|
427
|
+
s.cidr !== "100.64.0.2/32")
|
|
425
428
|
.map((subnet, index) => {
|
|
426
429
|
return {
|
|
427
430
|
id: index + 1,
|
|
@@ -442,7 +445,13 @@ export class KeaService extends Service {
|
|
|
442
445
|
Dhcp6: {
|
|
443
446
|
...(await commonConfig("6")),
|
|
444
447
|
subnet6: subnets
|
|
445
|
-
.filter(
|
|
448
|
+
.filter(
|
|
449
|
+
s =>
|
|
450
|
+
s.family === "IPv6" &&
|
|
451
|
+
!isLinkLocal(s.address) &&
|
|
452
|
+
// TODO keep out tailscale
|
|
453
|
+
s.cidr !== "fd7a:115c:a1e0::/64"
|
|
454
|
+
)
|
|
446
455
|
.map((subnet, index) => {
|
|
447
456
|
return {
|
|
448
457
|
id: index + 1,
|