fixes #23983
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 6a4b21bd86
)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
65a256f7a8
commit
b74b71ecb3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue