mirror of https://github.com/containers/podman.git
Fixes port collision issue on use of --publish-all
The function which generates and assigns a random port number for the --publish-all functionality was not properly marking some ports as "used". In very rare occasions this can cause a randomly "generated" port to be used twice creating an impossible container configuration. Signed-off-by: telday <ellis.wright@cyberark.com>
This commit is contained in:
parent
929d03a5ea
commit
15594e92e5
|
@ -311,6 +311,8 @@ func ParsePortMapping(portMappings []types.PortMapping, exposePorts map[uint16][
|
|||
return nil, err
|
||||
}
|
||||
portMappings = append(portMappings, p)
|
||||
// Mark this port as used so it doesn't get re-generated
|
||||
allPorts[p.HostPort] = true
|
||||
} else {
|
||||
newProtocols = append(newProtocols, protocol)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue