pmcf 2.49.1 → 2.50.0
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 +2 -2
- package/src/services/dhcp.mjs +3 -8
- package/src/subnet.mjs +6 -0
- package/types/subnet.d.mts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"typescript": "^5.8.3"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
|
-
"node": ">=22.15.
|
|
62
|
+
"node": ">=22.15.1"
|
|
63
63
|
},
|
|
64
64
|
"repository": {
|
|
65
65
|
"type": "git",
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -189,10 +189,7 @@ export class DHCPService extends Service {
|
|
|
189
189
|
"control-socket": toUnix(
|
|
190
190
|
this.endpoint(e => e.type === "kea-control-ddns")
|
|
191
191
|
),
|
|
192
|
-
|
|
193
|
-
"socket-type": "unix",
|
|
194
|
-
"socket-name": "/run/kea/ddns-ctrl-socket"
|
|
195
|
-
} */ "tsig-keys": [],
|
|
192
|
+
"tsig-keys": [],
|
|
196
193
|
"forward-ddns": {
|
|
197
194
|
"ddns-domains": dnsServersSlot([...this.domains])
|
|
198
195
|
},
|
|
@@ -249,9 +246,7 @@ export class DHCPService extends Service {
|
|
|
249
246
|
);
|
|
250
247
|
|
|
251
248
|
const subnets = [...this.subnets].filter(
|
|
252
|
-
s =>
|
|
253
|
-
s !== SUBNET_LOCALHOST_IPV4 &&
|
|
254
|
-
s !== SUBNET_LOCALHOST_IPV6 /* s.address !== "127/8"*/
|
|
249
|
+
s => s !== SUBNET_LOCALHOST_IPV4 && s !== SUBNET_LOCALHOST_IPV6
|
|
255
250
|
); // TODO no localhost
|
|
256
251
|
const dhcp4 = {
|
|
257
252
|
Dhcp4: {
|
|
@@ -282,7 +277,7 @@ export class DHCPService extends Service {
|
|
|
282
277
|
return {
|
|
283
278
|
id: index + 1,
|
|
284
279
|
subnet: subnet.longAddress,
|
|
285
|
-
pools: [{ pool: subnet.
|
|
280
|
+
pools: [{ pool: subnet.dhcpUsableAddressRange.join(" - ") }],
|
|
286
281
|
"option-data": [
|
|
287
282
|
{
|
|
288
283
|
name: "routers",
|
package/src/subnet.mjs
CHANGED
|
@@ -64,6 +64,12 @@ export class Subnet extends Base {
|
|
|
64
64
|
return rangeIP(this.prefix, this.prefixLength, 1, 1).map(a => decodeIP(a));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
get dhcpUsableAddressRange()
|
|
68
|
+
{
|
|
69
|
+
/* TODO where to take values from ? */
|
|
70
|
+
return rangeIP(this.prefix, this.prefixLength, 51, 6).map(a => decodeIP(a));
|
|
71
|
+
}
|
|
72
|
+
|
|
67
73
|
get address() {
|
|
68
74
|
return this.name;
|
|
69
75
|
}
|
package/types/subnet.d.mts
CHANGED