diff --git a/daemon/networkdriver/bridge/driver.go b/daemon/networkdriver/bridge/driver.go index 81624ad1db..2f94f055bb 100644 --- a/daemon/networkdriver/bridge/driver.go +++ b/daemon/networkdriver/bridge/driver.go @@ -171,6 +171,9 @@ func InitDriver(job *engine.Job) engine.Status { } } + // Block BridgeIP in IP allocator + ipallocator.RequestIP(bridgeNetwork, bridgeNetwork.IP) + // https://github.com/docker/docker/issues/2768 job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", bridgeNetwork.IP) diff --git a/daemon/networkdriver/ipallocator/allocator.go b/daemon/networkdriver/ipallocator/allocator.go index a8625c0300..40c3eb823e 100644 --- a/daemon/networkdriver/ipallocator/allocator.go +++ b/daemon/networkdriver/ipallocator/allocator.go @@ -121,7 +121,6 @@ func (allocated *allocatedMap) checkIP(ip net.IP) (net.IP, error) { // Register the IP. allocated.p[ip.String()] = struct{}{} - allocated.last.Set(pos) return ip, nil }