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-2.0.9~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb8f5b73cdc179cc36e0bb694d2263f9dd9f78e8;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 c20d5980f..9561f70ec 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -2322,7 +2322,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') @@ -2531,7 +2531,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; }