pmcf 2.64.1 → 2.64.3
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.64.
|
|
3
|
+
"version": "2.64.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"ip-utilties": "^1.4.6",
|
|
50
50
|
"npm-pkgbuild": "^18.2.10",
|
|
51
|
-
"pacc": "^3.4.
|
|
51
|
+
"pacc": "^3.4.5",
|
|
52
52
|
"pkg-dir": "^8.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -17,6 +17,8 @@ const _localAddresses = new Map([
|
|
|
17
17
|
["::1", SUBNET_LOCALHOST_IPV6]
|
|
18
18
|
]);
|
|
19
19
|
|
|
20
|
+
const _localDomains = new Set(["localhost"]);
|
|
21
|
+
|
|
20
22
|
export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
21
23
|
static {
|
|
22
24
|
addType(this);
|
|
@@ -40,7 +42,11 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
get localDomains() {
|
|
43
|
-
return
|
|
45
|
+
return _localDomains;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get domainNames() {
|
|
49
|
+
return _localDomains;
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
get hostName() {
|
package/src/services/bind.mjs
CHANGED
|
@@ -395,13 +395,16 @@ export class BindService extends ExtraSourceService {
|
|
|
395
395
|
};
|
|
396
396
|
configs.push(config);
|
|
397
397
|
|
|
398
|
-
const locationRecord = DNSRecord("location", "TXT", locationName);
|
|
399
|
-
|
|
400
398
|
const zone = {
|
|
401
399
|
id: domain,
|
|
402
400
|
file: `${locationName}/${domain}.zone`,
|
|
403
|
-
records: new Set(
|
|
401
|
+
records: new Set(this.defaultRecords)
|
|
404
402
|
};
|
|
403
|
+
|
|
404
|
+
if (this.hasLocationRecord) {
|
|
405
|
+
zone.records.add(DNSRecord("location", "TXT", locationName));
|
|
406
|
+
}
|
|
407
|
+
|
|
405
408
|
config.zones.push(zone);
|
|
406
409
|
|
|
407
410
|
if (this.hasCatalog) {
|
|
@@ -439,78 +442,69 @@ export class BindService extends ExtraSourceService {
|
|
|
439
442
|
!this.exclude.has(networkInterface.network) &&
|
|
440
443
|
!this.excludeInterfaceKinds.has(networkInterface.kind)
|
|
441
444
|
) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
let reverseZone = reverseZones.get(subnet.address);
|
|
461
|
-
|
|
462
|
-
if (!reverseZone) {
|
|
463
|
-
const id = reverseArpa(subnet.prefix);
|
|
464
|
-
reverseZone = {
|
|
465
|
-
id,
|
|
466
|
-
type: "plain",
|
|
467
|
-
file: `${locationName}/${id}.zone`,
|
|
468
|
-
records: new Set(this.defaultRecords)
|
|
469
|
-
};
|
|
470
|
-
config.zones.push(reverseZone);
|
|
471
|
-
reverseZones.set(subnet.address, reverseZone);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
for (const domainName of host.domainNames) {
|
|
475
|
-
reverseZone.records.add(
|
|
476
|
-
DNSRecord(
|
|
477
|
-
dnsFullName(reverseArpa(address)),
|
|
478
|
-
"PTR",
|
|
479
|
-
dnsFullName(domainName)
|
|
480
|
-
)
|
|
481
|
-
);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
445
|
+
if (
|
|
446
|
+
!addresses.has(address) &&
|
|
447
|
+
(this.hasLinkLocalAdresses || !isLinkLocal(address))
|
|
448
|
+
) {
|
|
449
|
+
addresses.add(address);
|
|
450
|
+
|
|
451
|
+
let reverseZone = reverseZones.get(subnet.address);
|
|
452
|
+
|
|
453
|
+
if (!reverseZone) {
|
|
454
|
+
const id = reverseArpa(subnet.prefix);
|
|
455
|
+
reverseZone = {
|
|
456
|
+
id,
|
|
457
|
+
type: "plain",
|
|
458
|
+
file: `${locationName}/${id}.zone`,
|
|
459
|
+
records: new Set(this.defaultRecords)
|
|
460
|
+
};
|
|
461
|
+
config.zones.push(reverseZone);
|
|
462
|
+
reverseZones.set(subnet.address, reverseZone);
|
|
484
463
|
}
|
|
485
464
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
465
|
+
for (const domainName of domainNames) {
|
|
466
|
+
zone.records.add(
|
|
467
|
+
DNSRecord(
|
|
468
|
+
dnsFullName(domainName),
|
|
469
|
+
dnsRecordTypeForAddressFamily(family),
|
|
470
|
+
address
|
|
471
|
+
)
|
|
472
|
+
);
|
|
473
|
+
|
|
474
|
+
reverseZone.records.add(
|
|
475
|
+
DNSRecord(
|
|
476
|
+
dnsFullName(reverseArpa(address)),
|
|
477
|
+
"PTR",
|
|
478
|
+
dnsFullName(domainName)
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
498
483
|
|
|
499
|
-
|
|
484
|
+
const host = networkInterface.host;
|
|
485
|
+
if (host && !hosts.has(host)) {
|
|
486
|
+
hosts.add(host);
|
|
500
487
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
488
|
+
for (const foreignDomainName of host.foreignDomainNames) {
|
|
489
|
+
zone.records.add(
|
|
490
|
+
DNSRecord("outfacing", "PTR", dnsFullName(foreignDomainName))
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
const sm = new Map();
|
|
509
495
|
|
|
510
|
-
|
|
511
|
-
|
|
496
|
+
for (const service of host._services) {
|
|
497
|
+
for (const record of service.dnsRecordsForDomainName(
|
|
498
|
+
host.domainName,
|
|
499
|
+
this.hasSVRRecords
|
|
500
|
+
)) {
|
|
501
|
+
sm.set(record.toString(), record);
|
|
512
502
|
}
|
|
513
503
|
}
|
|
504
|
+
|
|
505
|
+
for (const r of sm.values()) {
|
|
506
|
+
zone.records.add(r);
|
|
507
|
+
}
|
|
514
508
|
}
|
|
515
509
|
}
|
|
516
510
|
}
|
|
@@ -324,6 +324,7 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
|
324
324
|
get kind(): string;
|
|
325
325
|
get scope(): string;
|
|
326
326
|
get localDomains(): Set<string>;
|
|
327
|
+
get domainNames(): Set<string>;
|
|
327
328
|
get hostName(): string;
|
|
328
329
|
get ipAddresses(): Map<string, import("pmcf").Subnet>;
|
|
329
330
|
}
|