1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Fix REV and PTR (#979)

* Fix REV and PTR
This commit is contained in:
Tom Limoncelli
2020-12-03 08:33:37 -05:00
committed by GitHub
parent 2e7311078c
commit 6443a31ca8
9 changed files with 318 additions and 133 deletions

View File

@ -682,12 +682,17 @@ function recordBuilder(type, opts) {
opts.transform(record, parsedArgs, modifiers);
// Handle D_EXTEND() with subdomains.
if (d.subdomain && record.type != 'CF_REDIRECT' &&
record.type != 'CF_TEMP_REDIRECT') {
if (d.subdomain &&
record.type != 'CF_REDIRECT' &&
record.type != 'CF_TEMP_REDIRECT') {
fqdn = [d.subdomain, d.name].join(".")
record.subdomain = d.subdomain;
if (record.name == '@') {
record.subdomain = d.subdomain;
record.name = d.subdomain;
} else {
} else if (fqdn != record.name && record.type != 'PTR') {
record.subdomain = d.subdomain;
record.name += '.' + d.subdomain;
}
}