Commit 4bbafc12 by Bogdan Purcareata Committed by Stéphane Graber

config_network_type: set macvlan default mode to private

If a default mode is not set, the container requires an explicit mode specified in the config file, otherwise creating the container fails. Signed-off-by: 's avatarBogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 82d657b4
......@@ -303,6 +303,8 @@ out:
return ret;
}
static int macvlan_mode(int *valuep, const char *value);
static int config_network_type(const char *key, const char *value,
struct lxc_conf *lxc_conf)
{
......@@ -337,8 +339,10 @@ static int config_network_type(const char *key, const char *value,
if (!strcmp(value, "veth"))
netdev->type = LXC_NET_VETH;
else if (!strcmp(value, "macvlan"))
else if (!strcmp(value, "macvlan")) {
netdev->type = LXC_NET_MACVLAN;
macvlan_mode(&netdev->priv.macvlan_attr.mode, "private");
}
else if (!strcmp(value, "vlan"))
netdev->type = LXC_NET_VLAN;
else if (!strcmp(value, "phys"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment