mirror of
https://github.com/coredns/coredns.git
synced 2025-12-09 20:05:11 -05:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user