The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1791

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Fixes a warning when shutting down a container with a veth interface with no link property defined.

Signed-off-by: Wolfgang Bumiller <w.bumil...@proxmox.com>
From c869be202597b683af3ca38cbc92a6d34a5ad453 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumil...@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.bumil...@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;
                }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to