Просмотр исходного кода

Reject scope settings in config-only network

Signed-off-by: Alessandro Boch <aboch@docker.com>
Alessandro Boch 8 лет назад
Родитель
Сommit
bf98dc6a40
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      libnetwork/network.go

+ 2 - 2
libnetwork/network.go

@@ -356,10 +356,10 @@ func (n *network) validateConfiguration() error {
 	if n.configOnly {
 	if n.configOnly {
 		// Only supports network specific configurations.
 		// Only supports network specific configurations.
 		// Network operator configurations are not supported.
 		// Network operator configurations are not supported.
-		if n.ingress || n.internal || n.attachable {
+		if n.ingress || n.internal || n.attachable || n.scope != "" {
 			return types.ForbiddenErrorf("configuration network can only contain network " +
 			return types.ForbiddenErrorf("configuration network can only contain network " +
 				"specific fields. Network operator fields like " +
 				"specific fields. Network operator fields like " +
-				"[ ingress | internal | attachable ] are not supported.")
+				"[ ingress | internal | attachable | scope ] are not supported.")
 		}
 		}
 	}
 	}
 	if n.configFrom != "" {
 	if n.configFrom != "" {