Add PTR records to supported types (#5565)

* Add PTR records to supported types

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

* Add extra line

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

* Fix title

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

Signed-off-by: Alex Bulatov <xbulat@gmail.com>
This commit is contained in:
Alex
2022-08-14 17:26:39 +03:00
committed by GitHub
parent 5c1447e0b0
commit c9e9954d33
2 changed files with 43 additions and 1 deletions

View File

@@ -117,6 +117,8 @@ func getRecordValueForRewrite(rr dns.RR) (name string) {
return rr.(*dns.NAPTR).Replacement
case dns.TypeSOA:
return rr.(*dns.SOA).Ns
case dns.TypePTR:
return rr.(*dns.PTR).Ptr
default:
return ""
}
@@ -138,5 +140,7 @@ func setRewrittenRecordValue(rr dns.RR, value string) {
rr.(*dns.NAPTR).Replacement = value
case dns.TypeSOA:
rr.(*dns.SOA).Ns = value
case dns.TypePTR:
rr.(*dns.PTR).Ptr = value
}
}