Before, a veth device pair required a link which was treated as
a bridge device. Code crashed if there was no lxc.network.link
specified. Fix that by allowing lxc.network.link to be unset
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
}
if (lxc_veth_create(veth1, veth2)) {
- ERROR("failed to create %s-%s/%s",
- veth1, veth2, netdev->link);
+ ERROR("failed to create %s-%s", veth1, veth2);
goto out;
}
}
}
- if (lxc_bridge_attach(netdev->link, veth1)) {
+ if (netdev->link && lxc_bridge_attach(netdev->link, veth1)) {
ERROR("failed to attach '%s' to the bridge '%s'",
veth1, netdev->link);
goto out_delete;