Merge pull request #1605 from sanimej/slice

ResolveName should return copy of IPs
This commit is contained in:
Alessandro Boch 2016-12-29 12:26:07 -08:00 committed by GitHub
commit ac7deb041b

View file

@ -1645,7 +1645,9 @@ func (n *network) ResolveName(req string, ipType int) ([]net.IP, bool) {
}
if ip != nil {
return ip, false
ipLocal := make([]net.IP, len(ip))
copy(ipLocal, ip)
return ipLocal, false
}
return nil, ipv6Miss