mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
This fix adds unit tests for `ExtractAddressFromReverse`. It also updates the implementation of `ExtractAddressFromReverse` so that only a valid IPv4 or IPv6 address (in string format) is returned. If the addresses is not valid and can not be handled by golang's `net.ParseIP` then an empty string (`""`) will be returned. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>