Explorar o código

Merge pull request #1763 from aboch/sco

Reject scope settings in config-only network
Madhu Venugopal %!s(int64=8) %!d(string=hai) anos
pai
achega
412df2d5c5
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      libnetwork/network.go

+ 2 - 2
libnetwork/network.go

@@ -356,10 +356,10 @@ func (n *network) validateConfiguration() error {
 	if n.configOnly {
 		// Only supports network specific configurations.
 		// 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 " +
 				"specific fields. Network operator fields like " +
-				"[ ingress | internal | attachable ] are not supported.")
+				"[ ingress | internal | attachable | scope ] are not supported.")
 		}
 	}
 	if n.configFrom != "" {