Various changes.

This commit is contained in:
Matt Burchett
2019-01-14 12:31:46 -06:00
parent d62f45cc10
commit 43ed2ea438
3 changed files with 7 additions and 4 deletions

View File

@ -28,6 +28,7 @@ func lookupName(fqdn, serverAddr string) (string, error) {
return "", errors.New("no A record returned")
}
// PerformZoneTransfer performs zone transfers and gathers a list from config.Domains
func PerformZoneTransfer(config config.Config) []string {
data := make([]string, 0)
@ -46,7 +47,6 @@ func PerformZoneTransfer(config config.Config) []string {
var ip, hostname, txt string
switch v := a.(type) {
case *dns.TXT:
txt = string(v.Txt[0])
hostname = v.Hdr.Name
cip, err := lookupName(strings.TrimRight(v.Hdr.Name, "."), server)
if err != nil || cip == "" {