mirror of
https://github.com/coredns/coredns.git
synced 2026-07-11 18:20:10 -04:00
fix: accept scoped IPv6 addresses in transfer targets (#8204)
Signed-off-by: immanuwell <pchpr.00@list.ru>
This commit is contained in:
committed by
GitHub
parent
69e7a4be73
commit
45a20ddcf1
@@ -113,13 +113,13 @@ func HostPort(s, defaultPort string) (string, error) {
|
||||
port = defaultPort
|
||||
}
|
||||
if err != nil {
|
||||
if net.ParseIP(s) == nil {
|
||||
if net.ParseIP(stripZone(s)) == nil {
|
||||
return "", fmt.Errorf("must specify an IP address: `%s'", s)
|
||||
}
|
||||
return net.JoinHostPort(s, port), nil
|
||||
}
|
||||
|
||||
if net.ParseIP(addr) == nil {
|
||||
if net.ParseIP(stripZone(addr)) == nil {
|
||||
return "", fmt.Errorf("must specify an IP address: `%s'", addr)
|
||||
}
|
||||
return net.JoinHostPort(addr, port), nil
|
||||
|
||||
Reference in New Issue
Block a user