diff --git a/api/server/router/network/network_routes.go b/api/server/router/network/network_routes.go index 0fd67eb310b10..5520ada5308f2 100644 --- a/api/server/router/network/network_routes.go +++ b/api/server/router/network/network_routes.go @@ -213,6 +213,10 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr return libnetwork.NetworkNameError(create.Name) } + // For a Swarm-scoped network, this call to backend.CreateNetwork is used to + // validate the configuration. The network will not be created but, if the + // configuration is valid, ManagerRedirectError will be returned and handled + // below. nw, err := n.backend.CreateNetwork(create) if err != nil { if _, ok := err.(libnetwork.ManagerRedirectError); !ok {