pmcf 6.67.1 → 6.67.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 +1 -1
- package/src/services/kea.mjs +9 -4
package/package.json
CHANGED
package/src/services/kea.mjs
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from "pmcf";
|
|
28
28
|
import { FAMILY_UNIX, PROTOCOL_TCP } from "../constants.mjs";
|
|
29
29
|
import { writeLines } from "../utils.mjs";
|
|
30
|
+
import { dnsFullName } from "../dns-utils.mjs";
|
|
30
31
|
|
|
31
32
|
class kea_subnet extends Subnet {
|
|
32
33
|
static attributes = {
|
|
@@ -354,10 +355,11 @@ export class kea extends CoreService {
|
|
|
354
355
|
}
|
|
355
356
|
];
|
|
356
357
|
|
|
357
|
-
const dnsServersSlot = names =>
|
|
358
|
+
const dnsServersSlot = (names, keyName) =>
|
|
358
359
|
names.map(name => {
|
|
359
360
|
return {
|
|
360
|
-
name,
|
|
361
|
+
name: dnsFullName(name),
|
|
362
|
+
"key-name": keyName,
|
|
361
363
|
"dns-servers": asArray(this.dnsServerEndpoints)
|
|
362
364
|
.filter(
|
|
363
365
|
endpoint =>
|
|
@@ -372,6 +374,8 @@ export class kea extends CoreService {
|
|
|
372
374
|
|
|
373
375
|
const ddnsEndpoint = this.endpoint("kea-dhcp-ddns");
|
|
374
376
|
|
|
377
|
+
const keyName = asArray(this.keys)[0].name;
|
|
378
|
+
|
|
375
379
|
const ddns = {
|
|
376
380
|
DhcpDdns: {
|
|
377
381
|
"ip-address": ddnsEndpoint.address,
|
|
@@ -388,11 +392,12 @@ export class kea extends CoreService {
|
|
|
388
392
|
};
|
|
389
393
|
}),
|
|
390
394
|
"forward-ddns": {
|
|
391
|
-
"ddns-domains": dnsServersSlot([...this.domains])
|
|
395
|
+
"ddns-domains": dnsServersSlot([...this.domains], keyName)
|
|
392
396
|
},
|
|
393
397
|
"reverse-ddns": {
|
|
394
398
|
"ddns-domains": dnsServersSlot(
|
|
395
|
-
subnets.map(s => s.prefix).map(prefix => reverseArpa(prefix))
|
|
399
|
+
subnets.map(s => s.prefix).map(prefix => reverseArpa(prefix)),
|
|
400
|
+
keyName
|
|
396
401
|
)
|
|
397
402
|
},
|
|
398
403
|
loggers
|