From: Wolfgang Bumiller Date: Wed, 6 Sep 2017 09:51:03 +0000 (+0200) Subject: network: add missing checks for empty links X-Git-Tag: lxc-3.0.0.beta1~249^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1791%2Fhead;p=thirdparty%2Flxc.git network: add missing checks for empty links Signed-off-by: Wolfgang Bumiller --- diff --git a/src/lxc/network.c b/src/lxc/network.c index a7f054e79..982f2eefb 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -2350,7 +2350,7 @@ bool lxc_delete_network_unpriv(struct lxc_handler *handler) if (netdev->type != LXC_NET_VETH) continue; - if (!is_ovs_bridge(netdev->link)) + if (netdev->link[0] == '\0' || !is_ovs_bridge(netdev->link)) continue; if (netdev->priv.veth_attr.pair[0] != '\0') @@ -2559,7 +2559,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler) } INFO("Removed interface \"%s\" from \"%s\"", hostveth, netdev->link); - if (!is_ovs_bridge(netdev->link)) { + if (netdev->link[0] == '\0' || !is_ovs_bridge(netdev->link)) { netdev->priv.veth_attr.veth1[0] = '\0'; continue; }