pmcf 1.45.0 → 1.45.1
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/bin/pmcf-named-defs +22 -21
- package/package.json +1 -1
package/bin/pmcf-named-defs
CHANGED
|
@@ -69,6 +69,7 @@ async function generateNamedDefs(owner, targetDir) {
|
|
|
69
69
|
rname,
|
|
70
70
|
subnets.map(s => `${s.owner.name}/${s.name}`)
|
|
71
71
|
);
|
|
72
|
+
const reverseZones = new Map();
|
|
72
73
|
|
|
73
74
|
const SOARecord = createRecord(
|
|
74
75
|
"@",
|
|
@@ -135,28 +136,28 @@ async function generateNamedDefs(owner, targetDir) {
|
|
|
135
136
|
);
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
|
-
}
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
140
|
+
if (subnet) {
|
|
141
|
+
let reverseZone = reverseZones.get(subnet.address);
|
|
142
|
+
|
|
143
|
+
if (!reverseZone) {
|
|
144
|
+
const reverseArpa = reverseArpaAddress(subnet.prefix);
|
|
145
|
+
reverseZone = {
|
|
146
|
+
id: reverseArpa,
|
|
147
|
+
file: `${reverseArpa}.zone`,
|
|
148
|
+
records: new Set([SOARecord, NSRecord])
|
|
149
|
+
};
|
|
150
|
+
zones.push(reverseZone);
|
|
151
|
+
reverseZones.set(subnet.address, reverseZone);
|
|
152
|
+
}
|
|
153
|
+
reverseZone.records.add(
|
|
154
|
+
createRecord(
|
|
155
|
+
fullName(reverseArpaAddress(address)),
|
|
156
|
+
"PTR",
|
|
157
|
+
fullName(host.domainName)
|
|
158
|
+
)
|
|
159
|
+
);
|
|
160
|
+
}
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
|