1 From c1c1e55305a06786ee3dd938e421ca413db73dd1 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Wed, 6 Sep 2017 11:51:03 +0200
4 Subject: [PATCH 09/10] network: add missing checks for empty links
6 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 src/lxc/network.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
11 diff --git a/src/lxc/network.c b/src/lxc/network.c
12 index 3c0597c7..0ad42318 100644
13 --- a/src/lxc/network.c
14 +++ b/src/lxc/network.c
15 @@ -2355,7 +2355,7 @@ bool lxc_delete_network_unpriv(struct lxc_handler *handler)
16 if (netdev->type != LXC_NET_VETH)
19 - if (!is_ovs_bridge(netdev->link))
20 + if (netdev->link[0] == '\0' || !is_ovs_bridge(netdev->link))
23 if (netdev->priv.veth_attr.pair[0] != '\0')
24 @@ -2564,7 +2564,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler)
26 INFO("Removed interface \"%s\" from \"%s\"", hostveth, netdev->link);
28 - if (!is_ovs_bridge(netdev->link)) {
29 + if (netdev->link[0] == '\0' || !is_ovs_bridge(netdev->link)) {
30 netdev->priv.veth_attr.veth1[0] = '\0';