|
|
51d9a2 |
From 01d4d47593cc3e8c10c37a899b9edb70234c0547 Mon Sep 17 00:00:00 2001
|
|
|
51d9a2 |
Message-Id: <01d4d47593cc3e8c10c37a899b9edb70234c0547@dist-git>
|
|
|
51d9a2 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
51d9a2 |
Date: Wed, 25 Jul 2018 13:52:55 +0200
|
|
|
51d9a2 |
Subject: [PATCH] domain_nwfilter: Return early if net has no name in
|
|
|
51d9a2 |
virDomainConfNWFilterTeardownImpl
|
|
|
51d9a2 |
MIME-Version: 1.0
|
|
|
51d9a2 |
Content-Type: text/plain; charset=UTF-8
|
|
|
51d9a2 |
Content-Transfer-Encoding: 8bit
|
|
|
51d9a2 |
|
|
|
51d9a2 |
https://bugzilla.redhat.com/show_bug.cgi?id=1607831
|
|
|
51d9a2 |
|
|
|
51d9a2 |
This function is called from various clean up paths (e.g.
|
|
|
51d9a2 |
from qemuBuildInterfaceCommandLine). However, depending on the
|
|
|
51d9a2 |
stage the interface creation process failed at, net->ifname might
|
|
|
51d9a2 |
still be not filled in when control jumps to cleanup label. If
|
|
|
51d9a2 |
that is the case return early (avoiding useless error message
|
|
|
51d9a2 |
produced in virNWFilterBindingLookupByPortDev) as there is no
|
|
|
51d9a2 |
NWFilter to tear down anyway.
|
|
|
51d9a2 |
|
|
|
51d9a2 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
51d9a2 |
Reviewed-by: Erik Skultety <eskultet@redhat.com>
|
|
|
51d9a2 |
(cherry picked from commit 3087b27cffdd46ad0e953e061d6f3c519aefd5d8)
|
|
|
51d9a2 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
51d9a2 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
51d9a2 |
---
|
|
|
51d9a2 |
src/conf/domain_nwfilter.c | 3 +++
|
|
|
51d9a2 |
1 file changed, 3 insertions(+)
|
|
|
51d9a2 |
|
|
|
51d9a2 |
diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c
|
|
|
51d9a2 |
index 24b5f42ddd..f39c8a1f9b 100644
|
|
|
51d9a2 |
--- a/src/conf/domain_nwfilter.c
|
|
|
51d9a2 |
+++ b/src/conf/domain_nwfilter.c
|
|
|
51d9a2 |
@@ -133,6 +133,9 @@ virDomainConfNWFilterTeardownImpl(virConnectPtr conn,
|
|
|
51d9a2 |
{
|
|
|
51d9a2 |
virNWFilterBindingPtr binding;
|
|
|
51d9a2 |
|
|
|
51d9a2 |
+ if (!net->ifname)
|
|
|
51d9a2 |
+ return;
|
|
|
51d9a2 |
+
|
|
|
51d9a2 |
binding = virNWFilterBindingLookupByPortDev(conn, net->ifname);
|
|
|
51d9a2 |
if (!binding)
|
|
|
51d9a2 |
return;
|
|
|
51d9a2 |
--
|
|
|
51d9a2 |
2.18.0
|
|
|
51d9a2 |
|