Sfoglia il codice sorgente

Docker deamon doesn't work with --fixed-cidr on windows

Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
Sandeep Bansal 8 anni fa
parent
commit
5ab9b5e6a9
1 ha cambiato i file con 2 aggiunte e 7 eliminazioni
  1. 2 7
      libnetwork/ipams/windowsipam/windowsipam.go

+ 2 - 7
libnetwork/ipams/windowsipam/windowsipam.go

@@ -5,7 +5,6 @@ import (
 
 
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/ipamapi"
 	"github.com/docker/libnetwork/ipamapi"
-	"github.com/docker/libnetwork/netlabel"
 	"github.com/docker/libnetwork/types"
 	"github.com/docker/libnetwork/types"
 	"github.com/sirupsen/logrus"
 	"github.com/sirupsen/logrus"
 )
 )
@@ -75,15 +74,11 @@ func (a *allocator) RequestAddress(poolID string, prefAddress net.IP, opts map[s
 		return nil, nil, err
 		return nil, nil, err
 	}
 	}
 
 
-	// TODO Windows: Remove this once the bug in docker daemon is fixed
-	// that causes it to throw an exception on nil gateway
 	if prefAddress != nil {
 	if prefAddress != nil {
 		return &net.IPNet{IP: prefAddress, Mask: ipNet.Mask}, nil, nil
 		return &net.IPNet{IP: prefAddress, Mask: ipNet.Mask}, nil, nil
-	} else if opts[ipamapi.RequestAddressType] == netlabel.Gateway {
-		return ipNet, nil, nil
-	} else {
-		return nil, nil, nil
 	}
 	}
+
+	return nil, nil, nil
 }
 }
 
 
 // ReleaseAddress releases the address - always succeeds
 // ReleaseAddress releases the address - always succeeds