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

Add CAA support (#161)

* Added CAA support

* Fixed bind parsing of CAA records

* Added CAA parsing test

* Renamed CAA json fields

* Added CAA tag validation

* Updated CAA docs to clarify on the value field

* parse_tests: Fixed typo in caaflags

* Added integration test

* Small cleanups
This commit is contained in:
Tom Limoncelli
2017-07-25 14:59:40 -04:00
committed by GitHub
parent 1a84edbe9c
commit 2f0f5330fc
16 changed files with 283 additions and 58 deletions

View File

@ -47,7 +47,7 @@ func initBind(config map[string]string, providermeta json.RawMessage) (providers
}
func init() {
providers.RegisterDomainServiceProviderType("BIND", initBind, providers.CanUsePTR, providers.CanUseSRV)
providers.RegisterDomainServiceProviderType("BIND", initBind, providers.CanUsePTR, providers.CanUseSRV, providers.CanUseCAA)
}
type SoaInfo struct {
@ -93,6 +93,10 @@ func rrToRecord(rr dns.RR, origin string, replaceSerial uint32) (models.RecordCo
rc.Target = v.A.String()
case *dns.AAAA:
rc.Target = v.AAAA.String()
case *dns.CAA:
rc.CaaTag = v.Tag
rc.CaaFlag = v.Flag
rc.Target = v.Value
case *dns.CNAME:
rc.Target = v.Target
case *dns.MX: