diff --git a/vendor.conf b/vendor.conf index afb4d44f0a..906620a7a4 100644 --- a/vendor.conf +++ b/vendor.conf @@ -100,7 +100,7 @@ github.com/docker/containerd 03e5862ec0d8d3b3f750e19fca3ee367e13c090e github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4 # cluster -github.com/docker/swarmkit 70cb786be80c77cc983792a4259ba9098158c32e +github.com/docker/swarmkit 296fcfcf1e86a26a3f52aa84d638fbf80f9a8443 github.com/golang/mock bd3c8e81be01eef76d4b503f5e687d2d1354d2d9 github.com/gogo/protobuf v0.3 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a diff --git a/vendor/github.com/docker/swarmkit/manager/controlapi/common.go b/vendor/github.com/docker/swarmkit/manager/controlapi/common.go index f180cbd6a6..9e52f05a7f 100644 --- a/vendor/github.com/docker/swarmkit/manager/controlapi/common.go +++ b/vendor/github.com/docker/swarmkit/manager/controlapi/common.go @@ -76,7 +76,7 @@ func validateAnnotations(m api.Annotations) error { return nil } -func validateDriver(driver *api.Driver) error { +func validateDriver(driver *api.Driver, defName string) error { if driver == nil { // It is ok to not specify the driver. We will choose // a default driver. @@ -87,5 +87,8 @@ func validateDriver(driver *api.Driver) error { return grpc.Errorf(codes.InvalidArgument, "driver name: if driver is specified name is required") } + if driver.Name != defName { + return grpc.Errorf(codes.InvalidArgument, "invalid driver (%s) specified", driver.Name) + } return nil } diff --git a/vendor/github.com/docker/swarmkit/manager/controlapi/network.go b/vendor/github.com/docker/swarmkit/manager/controlapi/network.go index 8d662e772e..50eea01ae4 100644 --- a/vendor/github.com/docker/swarmkit/manager/controlapi/network.go +++ b/vendor/github.com/docker/swarmkit/manager/controlapi/network.go @@ -4,8 +4,10 @@ import ( "fmt" "net" + "github.com/docker/libnetwork/ipamapi" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/identity" + "github.com/docker/swarmkit/manager/allocator/networkallocator" "github.com/docker/swarmkit/manager/state/store" "golang.org/x/net/context" "google.golang.org/grpc" @@ -54,7 +56,7 @@ func validateIPAM(ipam *api.IPAMOptions) error { return nil } - if err := validateDriver(ipam.Driver); err != nil { + if err := validateDriver(ipam.Driver, ipamapi.DefaultIPAM); err != nil { return err } @@ -76,7 +78,7 @@ func validateNetworkSpec(spec *api.NetworkSpec) error { return err } - if err := validateDriver(spec.DriverConfig); err != nil { + if err := validateDriver(spec.DriverConfig, networkallocator.DefaultDriver); err != nil { return err }