pmcf 6.67.0 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.67.0",
3
+ "version": "6.67.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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
@@ -435,7 +440,9 @@ export class kea extends CoreService {
435
440
  : { "ip-address": addr };
436
441
  }
437
442
 
438
- let other = {};
443
+ const other = {
444
+ "hw-address": k
445
+ };
439
446
 
440
447
  switch (family) {
441
448
  case "4":
@@ -443,6 +450,7 @@ export class kea extends CoreService {
443
450
  const dhcpClientId = networkInterface.dhcpClientId;
444
451
  if (dhcpClientId !== undefined) {
445
452
  other["client-id"] = dhcpClientId;
453
+ delete other["hw-address"];
446
454
  }
447
455
  }
448
456
  break;
@@ -454,9 +462,8 @@ export class kea extends CoreService {
454
462
  }
455
463
 
456
464
  return {
457
- ...ip,
458
- "hw-address": k,
459
465
  hostname: networkInterface.domainName,
466
+ ...ip,
460
467
  ...other
461
468
  };
462
469
  })