mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ResolveName should return copy of IPs
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
176088a742
commit
16af9918c0
1 changed files with 3 additions and 1 deletions
|
@ -1645,7 +1645,9 @@ func (n *network) ResolveName(req string, ipType int) ([]net.IP, bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ip != nil {
|
if ip != nil {
|
||||||
return ip, false
|
ipLocal := make([]net.IP, len(ip))
|
||||||
|
copy(ipLocal, ip)
|
||||||
|
return ipLocal, false
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, ipv6Miss
|
return nil, ipv6Miss
|
||||||
|
|
Loading…
Add table
Reference in a new issue