char eth[128], *veth;
struct lxc_netdev *n = it->elem;
+ if (n->type != LXC_NET_VETH)
+ continue;
+
if (n->name) {
if (strlen(n->name) >= sizeof(eth))
goto err;
/* We only know how to restore containers with veth networks. */
lxc_list_for_each(it, &c->lxc_conf->network) {
struct lxc_netdev *n = it->elem;
- if (n->type != LXC_NET_VETH && n->type != LXC_NET_NONE) {
+ switch(n->type) {
+ case LXC_NET_VETH:
+ case LXC_NET_NONE:
+ case LXC_NET_EMPTY:
+ break;
+ default:
ERROR("Found network that is not VETH or NONE\n");
return false;
}
lxc_list_for_each(it, &c->lxc_conf->network) {
struct lxc_netdev *netdev = it->elem;
char template[IFNAMSIZ];
+
+ if (netdev->type != LXC_NET_VETH)
+ continue;
+
snprintf(template, sizeof(template), "vethXXXXXX");
if (!netdev->priv.veth_attr.pair)