1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Macvlan network handles netlabel.Internal wrong

check value of netlabel.Internal not just it's existence

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
This commit is contained in:
Pavel Matěja 2019-06-27 15:53:57 +02:00
parent 5c8048b363
commit e5353649f6

View file

@ -186,10 +186,12 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
}
}
// setting the parent to "" will trigger an isolated network dummy parent link
if _, ok := option[netlabel.Internal]; ok {
config.Internal = true
// empty --parent= and --internal are handled the same.
config.Parent = ""
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