Browse code

Remove BridgeIP from ipallocation pool

Closes #9938

Signed-off-by: Malte Janduda <mail@janduda.net>

Malte Janduda authored on 2015/01/09 00:21:01
Showing 2 changed files
... ...
@@ -171,6 +171,9 @@ func InitDriver(job *engine.Job) engine.Status {
171 171
 		}
172 172
 	}
173 173
 
174
+	// Block BridgeIP in IP allocator
175
+	ipallocator.RequestIP(bridgeNetwork, bridgeNetwork.IP)
176
+
174 177
 	// https://github.com/docker/docker/issues/2768
175 178
 	job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", bridgeNetwork.IP)
176 179
 
... ...
@@ -121,7 +121,6 @@ func (allocated *allocatedMap) checkIP(ip net.IP) (net.IP, error) {
121 121
 
122 122
 	// Register the IP.
123 123
 	allocated.p[ip.String()] = struct{}{}
124
-	allocated.last.Set(pos)
125 124
 
126 125
 	return ip, nil
127 126
 }