mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
plugin/kubernetes: PTR/A reverse query corner cases (#1551)
* better handle non PTR rev zone qrys * vice versa * tests * comment typo * much cleaner
This commit is contained in:
committed by
Miek Gieben
parent
3c31011ced
commit
395b614349
@@ -29,6 +29,11 @@ func ExtractAddressFromReverse(reverseName string) string {
|
||||
return f(strings.Split(search, "."))
|
||||
}
|
||||
|
||||
// IsReverse returns true if name is in a reverse zone
|
||||
func IsReverse(name string) bool {
|
||||
return strings.HasSuffix(name, v4arpaSuffix) || strings.HasSuffix(name, v6arpaSuffix)
|
||||
}
|
||||
|
||||
func reverse(slice []string) string {
|
||||
for i := 0; i < len(slice)/2; i++ {
|
||||
j := len(slice) - i - 1
|
||||
|
||||
Reference in New Issue
Block a user