Skip to content

Commit 15d891c

Browse files
committed
Ipvlan network handles netlabel.Internal wrong
check value of netlabel.Internal not just it's existence Signed-off-by: Pavel Matěja <pavel@verotel.cz>
1 parent 25d3ca9 commit 15d891c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/ipvlan/ipvlan_network.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
182182
}
183183
}
184184
// setting the parent to "" will trigger an isolated network dummy parent link
185-
if _, ok := option[netlabel.Internal]; ok {
186-
config.Internal = true
187-
// empty --parent= and --internal are handled the same.
188-
config.Parent = ""
185+
if val, ok := option[netlabel.Internal]; ok {
186+
if internal, ok := val.(bool); ok && internal {
187+
config.Internal = true
188+
// empty --parent= and --internal are handled the same.
189+
config.Parent = ""
190+
}
189191
}
190192
return config, nil
191193
}

0 commit comments

Comments
 (0)