pmcf 2.53.7 → 2.53.9
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/services/bind.mjs +4 -2
- package/src/services/dhcp.mjs +16 -7
package/package.json
CHANGED
package/src/services/bind.mjs
CHANGED
|
@@ -157,8 +157,10 @@ export class BINDService extends ExtraSourceService {
|
|
|
157
157
|
for (const na of this.owner.networkAddresses(
|
|
158
158
|
na => na.networkInterface.kind === "loopback"
|
|
159
159
|
)) {
|
|
160
|
-
endpoints.push(
|
|
161
|
-
|
|
160
|
+
endpoints.push(
|
|
161
|
+
new Endpoint(this, na, rdncEndpoint),
|
|
162
|
+
new Endpoint(this, na, statisticsEndpoint)
|
|
163
|
+
);
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
return filter ? endpoints.filter(filter) : endpoints;
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
3
|
+
import { reverseArpa } from "ip-utilties";
|
|
3
4
|
import {
|
|
4
5
|
Service,
|
|
5
6
|
sortInverseByPriority,
|
|
@@ -217,9 +218,9 @@ export class DHCPService extends Service {
|
|
|
217
218
|
"rebind-timer": 1800,
|
|
218
219
|
"valid-lifetime": 86400,
|
|
219
220
|
"hooks-libraries": [
|
|
220
|
-
{
|
|
221
|
+
/*{
|
|
221
222
|
library: "/usr/lib/kea/hooks/libdhcp_ddns_tuning.so"
|
|
222
|
-
}
|
|
223
|
+
},*/
|
|
223
224
|
{
|
|
224
225
|
library: "/usr/lib/kea/hooks/libdhcp_lease_cmds.so"
|
|
225
226
|
},
|
|
@@ -284,10 +285,10 @@ export class DHCPService extends Service {
|
|
|
284
285
|
}
|
|
285
286
|
};
|
|
286
287
|
|
|
287
|
-
const dnsServersSlot =
|
|
288
|
-
|
|
288
|
+
const dnsServersSlot = names =>
|
|
289
|
+
names.map(name => {
|
|
289
290
|
return {
|
|
290
|
-
name
|
|
291
|
+
name,
|
|
291
292
|
"dns-servers": dnsServerEndpoints
|
|
292
293
|
.filter(endpoint => endpoint.family === "IPv4")
|
|
293
294
|
.map(endpoint => {
|
|
@@ -298,6 +299,12 @@ export class DHCPService extends Service {
|
|
|
298
299
|
|
|
299
300
|
const ddnsEndpoint = this.endpoint(e => e.type === "kea-ddns");
|
|
300
301
|
|
|
302
|
+
const subnetPrefixes = new Set(
|
|
303
|
+
[...this.subnets]
|
|
304
|
+
.filter(s => s != SUBNET_LOCALHOST_IPV4 && s != SUBNET_LOCALHOST_IPV6)
|
|
305
|
+
.map(s => s.prefix)
|
|
306
|
+
);
|
|
307
|
+
|
|
301
308
|
const ddns = {
|
|
302
309
|
DhcpDdns: {
|
|
303
310
|
"ip-address": ddnsEndpoint.address,
|
|
@@ -310,7 +317,9 @@ export class DHCPService extends Service {
|
|
|
310
317
|
"ddns-domains": dnsServersSlot([...this.domains])
|
|
311
318
|
},
|
|
312
319
|
"reverse-ddns": {
|
|
313
|
-
"ddns-domains": dnsServersSlot(
|
|
320
|
+
"ddns-domains": dnsServersSlot(
|
|
321
|
+
[...subnetPrefixes].map(prefix => reverseArpa(prefix))
|
|
322
|
+
)
|
|
314
323
|
},
|
|
315
324
|
|
|
316
325
|
loggers
|
|
@@ -345,7 +354,7 @@ export class DHCPService extends Service {
|
|
|
345
354
|
"ip-address": networkInterface.networkAddress(
|
|
346
355
|
n => n.family === "IPv4"
|
|
347
356
|
).address,
|
|
348
|
-
hostname: networkInterface.
|
|
357
|
+
hostname: networkInterface.domainName,
|
|
349
358
|
"client-classes": ["SKIP_DDNS"]
|
|
350
359
|
};
|
|
351
360
|
})
|