pmcf 2.14.1 → 2.14.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 +2 -2
- package/src/services/dhcp.mjs +21 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"c8": "^10.1.3",
|
|
49
49
|
"documentation": "^14.0.3",
|
|
50
50
|
"semantic-release": "^24.2.3",
|
|
51
|
-
"typescript": "^5.8.
|
|
51
|
+
"typescript": "^5.8.3"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22.14.0"
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
serviceEndpoints
|
|
7
7
|
} from "../service.mjs";
|
|
8
8
|
import { addType } from "../types.mjs";
|
|
9
|
-
import { writeLines } from "../utils.mjs";
|
|
9
|
+
import { writeLines, isIPv4Address, isIPv6Address } from "../utils.mjs";
|
|
10
10
|
|
|
11
11
|
const DHCPServiceTypeDefinition = {
|
|
12
12
|
name: "dhcp",
|
|
@@ -186,9 +186,16 @@ export class DHCPService extends Service {
|
|
|
186
186
|
Dhcp4: {
|
|
187
187
|
...commonConfig,
|
|
188
188
|
"interfaces-config": {
|
|
189
|
-
interfaces:
|
|
190
|
-
.filter(
|
|
191
|
-
|
|
189
|
+
interfaces: this.endpoints
|
|
190
|
+
.filter(
|
|
191
|
+
endpoint =>
|
|
192
|
+
isIPv4Address(endpoint.rawAddress) &&
|
|
193
|
+
endpoint.networkInterface.kind !== "loopback"
|
|
194
|
+
)
|
|
195
|
+
.map(
|
|
196
|
+
endpoint =>
|
|
197
|
+
`${endpoint.networkInterface.name}/${endpoint.rawAddress}`
|
|
198
|
+
)
|
|
192
199
|
},
|
|
193
200
|
"multi-threading": {
|
|
194
201
|
"enable-multi-threading": false
|
|
@@ -233,9 +240,16 @@ export class DHCPService extends Service {
|
|
|
233
240
|
Dhcp6: {
|
|
234
241
|
...commonConfig,
|
|
235
242
|
"interfaces-config": {
|
|
236
|
-
interfaces:
|
|
237
|
-
.filter(
|
|
238
|
-
|
|
243
|
+
interfaces: this.endpoints
|
|
244
|
+
.filter(
|
|
245
|
+
endpoint =>
|
|
246
|
+
isIPv6Address(endpoint.rawAddress) &&
|
|
247
|
+
endpoint.networkInterface.kind !== "loopback"
|
|
248
|
+
)
|
|
249
|
+
.map(
|
|
250
|
+
endpoint =>
|
|
251
|
+
`${endpoint.networkInterface.name}/${endpoint.rawAddress}`
|
|
252
|
+
)
|
|
239
253
|
},
|
|
240
254
|
"control-socket": {
|
|
241
255
|
"socket-type": "unix",
|