[lxc-devel] [lxc/master] network: add missing checks for empty links
Blub on Github
lxc-bot at linuxcontainers.org
Wed Sep 6 10:01:19 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 461 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170906/e733e37e/attachment.bin>
-------------- next part --------------
From c869be202597b683af3ca38cbc92a6d34a5ad453 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller at proxmox.com>
Date: Wed, 6 Sep 2017 11:51:03 +0200
Subject: [PATCH] network: add missing checks for empty links
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
src/lxc/network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
}
More information about the lxc-devel
mailing list