mirror of
https://github.com/moby/moby.git
synced 2026-08-08 17:11:38 +00:00
inspect: unmap IPv6-mapped IPv4 host address
Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@@ -1133,8 +1133,11 @@ func getEndpointPortMapInfo(pm networktypes.PortMap, ep *libnetwork.Endpoint) {
|
||||
if pp.HostPort > 0 {
|
||||
hp = strconv.Itoa(int(pp.HostPort))
|
||||
}
|
||||
natBndg := networktypes.PortBinding{HostPort: hp}
|
||||
natBndg.HostIP, _ = netip.AddrFromSlice(pp.HostIP)
|
||||
hip, _ := netip.AddrFromSlice(pp.HostIP)
|
||||
natBndg := networktypes.PortBinding{
|
||||
HostIP: hip.Unmap(),
|
||||
HostPort: hp,
|
||||
}
|
||||
pm[natPort] = append(pm[natPort], natBndg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user