]> git.proxmox.com Git - lxc.git/blob - debian/patches/0009-network-add-missing-checks-for-empty-links.patch
ee3966e78e723f3595f8d9a8bc2b582c668c6397
[lxc.git] / debian / patches / 0009-network-add-missing-checks-for-empty-links.patch
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
5
6 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
7 ---
8 src/lxc/network.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
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)
17 continue;
18
19 - if (!is_ovs_bridge(netdev->link))
20 + if (netdev->link[0] == '\0' || !is_ovs_bridge(netdev->link))
21 continue;
22
23 if (netdev->priv.veth_attr.pair[0] != '\0')
24 @@ -2564,7 +2564,7 @@ bool lxc_delete_network_priv(struct lxc_handler *handler)
25 }
26 INFO("Removed interface \"%s\" from \"%s\"", hostveth, netdev->link);
27
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';
31 continue;
32 }
33 --
34 2.11.0
35