Skip to content

Commit

Permalink
RR.name: if name is same as previous, suppress
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 25, 2022
1 parent 1500ae9 commit 348eaf5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ class RR extends Map {
let rrTTL = this.get('ttl')
if (zone_opts.hide?.ttl && rrTTL === zone_opts.ttl) rrTTL = ''

return `${this.getFQDN('name', zone_opts)}\t${rrTTL}\t${classVal}\t${this.get('type')}`
let name = this.get('name')
if (zone_opts.previousName === name) {
name = ''
}
else {
name = this.getFQDN('name', zone_opts)
}

return `${name}\t${rrTTL}\t${classVal}\t${this.get('type')}`
}

getPrefixFields () {
Expand Down

0 comments on commit 348eaf5

Please sign in to comment.