mirror of https://github.com/docker/docs.git
Fix issues from rebase on master
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
da61b99b39
commit
5e69b3837b
|
|
@ -5,12 +5,11 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/dotcloud/docker/networkdriver"
|
"github.com/dotcloud/docker/networkdriver"
|
||||||
"github.com/dotcloud/docker/pkg/collections"
|
"github.com/dotcloud/docker/pkg/collections"
|
||||||
"github.com/dotcloud/docker/pkg/netlink"
|
|
||||||
"net"
|
"net"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
type networkSet map[iPNet]*collections.OrderedIntSet
|
type networkSet map[string]*collections.OrderedIntSet
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrNoAvailableIPs = errors.New("no available ip addresses on network")
|
ErrNoAvailableIPs = errors.New("no available ip addresses on network")
|
||||||
|
|
@ -149,7 +148,7 @@ func intToIP(n int32) *net.IP {
|
||||||
func checkAddress(address *net.IPNet) {
|
func checkAddress(address *net.IPNet) {
|
||||||
key := address.String()
|
key := address.String()
|
||||||
if _, exists := allocatedIPs[key]; !exists {
|
if _, exists := allocatedIPs[key]; !exists {
|
||||||
allocatedIPs[key] = &iPSet{}
|
allocatedIPs[key] = collections.NewOrderedIntSet()
|
||||||
availableIPS[key] = &iPSet{}
|
availableIPS[key] = collections.NewOrderedIntSet()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue