Deal in subnets, not ranges, when requesting address allocation

This commit is contained in:
Bryan Boreham committed 2016-03-02 17:21:51 -08:00
1 parent b76e2a87cf
commit 73f1a04d5f
4 files changed
+16 -16

No files matched your search

+1 -1
View File
@@ -195,7 +195,7 @@ func (e *errorCancelled) Error() string {
// Allocate (Sync) - get new IP address for container with given name in range
// if there isn't any space in that range we block indefinitely
func (alloc *Allocator) Allocate(ident string, r address.Range, hasBeenCancelled func() bool) (address.Address, error) {
func (alloc *Allocator) Allocate(ident string, r address.CIDR, hasBeenCancelled func() bool) (address.Address, error) {
resultChan := make(chan allocateResult)
op := &allocate{resultChan: resultChan, ident: ident, r: r, hasBeenCancelled: hasBeenCancelled}
alloc.doOperation(op, &alloc.pendingAllocates)