Merge pull request #612 from aboch/bip

Retire ipallocator
This commit is contained in:
Jana Radhakrishnan
2015-10-08 22:29:08 -07:00
3 changed files with 0 additions and 879 deletions
-12
View File
@@ -16,7 +16,6 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/libnetwork/datastore"
"github.com/docker/libnetwork/driverapi"
"github.com/docker/libnetwork/ipallocator"
"github.com/docker/libnetwork/iptables"
"github.com/docker/libnetwork/netlabel"
"github.com/docker/libnetwork/netutils"
@@ -42,10 +41,6 @@ const (
DefaultGatewayV6AuxKey = "DefaultGatewayIPv6"
)
var (
ipAllocator *ipallocator.IPAllocator
)
// configuration info for the "bridge" driver.
type configuration struct {
EnableIPForwarding bool
@@ -118,7 +113,6 @@ type driver struct {
// New constructs a new bridge driver
func newDriver() *driver {
ipAllocator = ipallocator.New()
return &driver{networks: map[string]*bridgeNetwork{}, config: &configuration{}}
}
@@ -1069,12 +1063,6 @@ func (d *driver) DeleteEndpoint(nid, eid string) error {
// Remove port mappings. Do not stop endpoint delete on unmap failure
n.releasePorts(ep)
// Release the v4 address allocated to this endpoint's sandbox interface
err = ipAllocator.ReleaseIP(n.bridge.bridgeIPv4, ep.addr.IP)
if err != nil {
return err
}
// Try removal of link. Discard error: link pair might have
// already been deleted by sandbox delete. Make sure defer
// does not see this error either.