Merge pull request #2419 from lemrouch/2418-fix

Fix internal macvlan network to work in swarm
This commit is contained in:
Arko Dasgupta 2020-02-20 16:03:19 -08:00 committed by GitHub
commit cedfa2f7b9
2 changed files with 0 additions and 6 deletions

View file

@ -194,12 +194,9 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
return nil, err
}
}
// setting the parent to "" will trigger an isolated network dummy parent link
if val, ok := option[netlabel.Internal]; ok {
if internal, ok := val.(bool); ok && internal {
config.Internal = true
// empty --parent= and --internal are handled the same.
config.Parent = ""
}
}
return config, nil

View file

@ -198,12 +198,9 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
return nil, err
}
}
// setting the parent to "" will trigger an isolated network dummy parent link
if val, ok := option[netlabel.Internal]; ok {
if internal, ok := val.(bool); ok && internal {
config.Internal = true
// empty --parent= and --internal are handled the same.
config.Parent = ""
}
}