Skip to content

Commit

Permalink
Use hostIP to decide on Portmapper version
Browse files Browse the repository at this point in the history
Use HostIP to decide which portmapper object to store the binding
in consistently in the allocate and release method (https://github.com/moby/libnetwork/blob/448016ef11309bd67541dcf4d72f1f5b7de94862/drivers/bridge/port_mapping.go#L208)

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
Arko Dasgupta committed Jan 23, 2021
1 parent 448016e commit a89455d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bridge/port_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (n *bridgeNetwork) allocatePort(bnd *types.PortBinding, ulPxyEnabled bool)

portmapper := n.portMapper

if bnd.IP.To4() == nil {
if bnd.HostIP.To4() == nil {
portmapper = n.portMapperV6
}

Expand Down

0 comments on commit a89455d

Please sign in to comment.