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

Make PTR more magical (#148)

* Initial code and tests
This commit is contained in:
Tom Limoncelli
2017-07-07 13:59:29 -04:00
committed by GitHub
parent 152892f62a
commit 582e5c2bb1
8 changed files with 214 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func ReverseDomainName(cidr string) (string, error) {
}
toTrim = (total - bits) / 4
} else {
return "", fmt.Errorf("Invalid mask bit size: %d", total)
return "", fmt.Errorf("Address is not IPv4 or IPv6: %v", cidr)
}
parts := strings.SplitN(base, ".", toTrim+1)