Restore isAgent || n.dynamic check

- This got mistakenly changed by 254d082cc3

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch 2017-05-18 12:19:16 -07:00
parent 86abd1ea41
commit 08d8cfa00f

View file

@ -911,8 +911,8 @@ func (n *network) driver(load bool) (driverapi.Driver, error) {
if n.scope == "" && cap != nil {
n.scope = cap.DataScope
}
if isAgent && n.dynamic {
// If we are running in agent mode and the network
if isAgent || n.dynamic {
// If we are running in agent mode or the network
// is dynamic, then the networks are swarm scoped
// regardless of the backing driver.
n.scope = datastore.SwarmScope