pmcf 2.53.6 → 2.53.8

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": "2.53.6",
3
+ "version": "2.53.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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(new Endpoint(this, na, rdncEndpoint));
161
- endpoints.push(new Endpoint(this, na, statisticsEndpoint));
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;
@@ -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,6 +218,9 @@ export class DHCPService extends Service {
217
218
  "rebind-timer": 1800,
218
219
  "valid-lifetime": 86400,
219
220
  "hooks-libraries": [
221
+ /*{
222
+ library: "/usr/lib/kea/hooks/libdhcp_ddns_tuning.so"
223
+ },*/
220
224
  {
221
225
  library: "/usr/lib/kea/hooks/libdhcp_lease_cmds.so"
222
226
  },
@@ -281,10 +285,10 @@ export class DHCPService extends Service {
281
285
  }
282
286
  };
283
287
 
284
- const dnsServersSlot = domains =>
285
- domains.map(domain => {
288
+ const dnsServersSlot = names =>
289
+ names.map(name => {
286
290
  return {
287
- name: domain,
291
+ name,
288
292
  "dns-servers": dnsServerEndpoints
289
293
  .filter(endpoint => endpoint.family === "IPv4")
290
294
  .map(endpoint => {
@@ -295,6 +299,12 @@ export class DHCPService extends Service {
295
299
 
296
300
  const ddnsEndpoint = this.endpoint(e => e.type === "kea-ddns");
297
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
+
298
308
  const ddns = {
299
309
  DhcpDdns: {
300
310
  "ip-address": ddnsEndpoint.address,
@@ -306,11 +316,12 @@ export class DHCPService extends Service {
306
316
  "forward-ddns": {
307
317
  "ddns-domains": dnsServersSlot([...this.domains])
308
318
  },
309
- /*
310
319
  "reverse-ddns": {
311
- "ddns-domains": dnsSlot()
320
+ "ddns-domains": dnsServersSlot(
321
+ [...subnetPrefixes].map(prefix => reverseArpa(prefix))
322
+ )
312
323
  },
313
- */
324
+
314
325
  loggers
315
326
  }
316
327
  };
@@ -343,7 +354,8 @@ export class DHCPService extends Service {
343
354
  "ip-address": networkInterface.networkAddress(
344
355
  n => n.family === "IPv4"
345
356
  ).address,
346
- hostname: networkInterface.hostName
357
+ hostname: networkInterface.hostName,
358
+ "client-classes": ["SKIP_DDNS"]
347
359
  };
348
360
  })
349
361
  .sort((a, b) => a.hostname.localeCompare(b.hostname));