Skip to content

Commit

Permalink
fixes #23983
Browse files Browse the repository at this point in the history
Signed-off-by: Madhu Venugopal <madhu@docker.com>
  • Loading branch information
mavenugo committed Jul 7, 2016
1 parent 4623276 commit 6a4b21b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/server/router/network/network_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr
return err
}

if _, err := n.clusterProvider.GetNetwork(create.Name); err == nil {
return libnetwork.NetworkNameError(create.Name)
}

nw, err := n.backend.CreateNetwork(create)
if err != nil {
if _, ok := err.(libnetwork.ManagerRedirectError); !ok {
Expand Down

0 comments on commit 6a4b21b

Please sign in to comment.