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
@@ -40,7 +40,7 @@ func writeAddresses(w http.ResponseWriter, cidrs []address.CIDR) {
func (alloc *Allocator) handleHTTPAllocate(dockerCli *docker.Client, w http.ResponseWriter, ident string, checkAlive bool, subnet address.CIDR) {
closedChan := w.(http.CloseNotifier).CloseNotify()
addr, err := alloc.Allocate(ident, subnet.HostRange(),
addr, err := alloc.Allocate(ident, subnet,
func() bool {
select {
case <-closedChan: