pmcf 2.51.3 → 2.51.4

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.51.3",
3
+ "version": "2.51.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -143,45 +143,7 @@ export class DHCPService extends Service {
143
143
  };
144
144
  });
145
145
 
146
- peers.length = 2;
147
-
148
- const commonConfig = {
149
- "lease-database": {
150
- type: "memfile",
151
- "lfc-interval": 3600
152
- },
153
- "multi-threading": {
154
- "enable-multi-threading": false
155
- },
156
- "expired-leases-processing": {
157
- "reclaim-timer-wait-time": 10,
158
- "flush-reclaimed-timer-wait-time": 25,
159
- "hold-reclaimed-time": 3600,
160
- "max-reclaim-leases": 100,
161
- "max-reclaim-time": 250,
162
- "unwarned-reclaim-cycles": 5
163
- },
164
- "renew-timer": 900,
165
- "rebind-timer": 1800,
166
- "valid-lifetime": 3600,
167
- "hooks-libraries": [
168
- {
169
- library: "/usr/lib/kea/hooks/libdhcp_lease_cmds.so"
170
- },
171
- {
172
- library: "/usr/lib/kea/hooks/libdhcp_ha.so",
173
- parameters: {
174
- "high-availability": [
175
- {
176
- "this-server-name": name,
177
- mode: "hot-standby",
178
- peers
179
- }
180
- ]
181
- }
182
- }
183
- ]
184
- };
146
+ peers.length = 2;
185
147
 
186
148
  const loggers = [
187
149
  {
@@ -195,6 +157,54 @@ export class DHCPService extends Service {
195
157
  }
196
158
  ];
197
159
 
160
+ const commonConfig = family => {
161
+ return {
162
+ "interfaces-config": {
163
+ interfaces: listenInterfaces(`IPv${family}`)
164
+ },
165
+ "control-socket": toUnix(
166
+ this.endpoint(e => e.type === `kea-control-dhcp${family}`)
167
+ ),
168
+ "lease-database": {
169
+ type: "memfile",
170
+ "lfc-interval": 3600
171
+ },
172
+ "multi-threading": {
173
+ "enable-multi-threading": false
174
+ },
175
+ "expired-leases-processing": {
176
+ "reclaim-timer-wait-time": 10,
177
+ "flush-reclaimed-timer-wait-time": 25,
178
+ "hold-reclaimed-time": 3600,
179
+ "max-reclaim-leases": 100,
180
+ "max-reclaim-time": 250,
181
+ "unwarned-reclaim-cycles": 5
182
+ },
183
+ "renew-timer": 900,
184
+ "rebind-timer": 1800,
185
+ "valid-lifetime": 3600,
186
+ "hooks-libraries": [
187
+ {
188
+ library: "/usr/lib/kea/hooks/libdhcp_lease_cmds.so"
189
+ },
190
+ {
191
+ library: "/usr/lib/kea/hooks/libdhcp_ha.so",
192
+ parameters: {
193
+ "high-availability": [
194
+ {
195
+ "this-server-name": name,
196
+ mode: "hot-standby",
197
+ peers
198
+ }
199
+ ]
200
+ }
201
+ }
202
+ ],
203
+ "dhcp-ddns": dhcpServerDdns,
204
+ loggers
205
+ };
206
+ };
207
+
198
208
  const toUnix = endpoint => {
199
209
  return {
200
210
  "socket-type": "unix",
@@ -251,7 +261,7 @@ export class DHCPService extends Service {
251
261
 
252
262
  const dhcpServerDdns = {
253
263
  "enable-updates": true,
254
- "server-address": ddnsEndpoint.address,
264
+ "server-ip": ddnsEndpoint.address,
255
265
  "server-port": ddnsEndpoint.port,
256
266
  "max-queue-size": 64,
257
267
  "ncr-protocol": "UDP",
@@ -297,14 +307,7 @@ export class DHCPService extends Service {
297
307
  );
298
308
  const dhcp4 = {
299
309
  Dhcp4: {
300
- ...commonConfig,
301
- "interfaces-config": {
302
- interfaces: listenInterfaces("IPv4")
303
- },
304
- "control-socket": {
305
- "socket-type": "unix",
306
- "socket-name": "/run/kea/4-ctrl-socket"
307
- },
310
+ ...commonConfig("4"),
308
311
  "option-data": [
309
312
  {
310
313
  name: "domain-name-servers",
@@ -333,21 +336,12 @@ export class DHCPService extends Service {
333
336
  ],
334
337
  reservations
335
338
  };
336
- }),
337
- "dhcp-ddns": dhcpServerDdns,
338
- loggers
339
+ })
339
340
  }
340
341
  };
341
342
  const dhcp6 = {
342
343
  Dhcp6: {
343
- ...commonConfig,
344
- "interfaces-config": {
345
- interfaces: listenInterfaces("IPv6")
346
- },
347
- "control-socket": {
348
- "socket-type": "unix",
349
- "socket-name": "/run/kea/6-ctrl-socket"
350
- },
344
+ ...commonConfig("6"),
351
345
  "preferred-lifetime": 3000,
352
346
  "option-data": [
353
347
  {
@@ -380,9 +374,7 @@ export class DHCPService extends Service {
380
374
  }*/
381
375
  ]
382
376
  };
383
- }),
384
- "dhcp-ddns": dhcpServerDdns,
385
- loggers
377
+ })
386
378
  }
387
379
  };
388
380