Blame SOURCES/libvirt-Fix-bug-with-loading-bridge-name-for-active-domain-during-libvirtd-start.patch

9119d9
From cbf7eb87e62645090cdc28c878c3fe13d7f76c31 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <cbf7eb87e62645090cdc28c878c3fe13d7f76c31@dist-git>
9119d9
From: Pavel Hrdina <phrdina@redhat.com>
9119d9
Date: Wed, 24 Sep 2014 11:59:36 +0200
9119d9
Subject: [PATCH] Fix bug with loading bridge name for active domain during
9119d9
 libvirtd start
9119d9
9119d9
If you have a bridge network in running domain and libvirtd is restarted
9119d9
the information about host bridge interface is lost from live xml.
9119d9
9119d9
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140085
9119d9
9119d9
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9119d9
(cherry picked from commit a71f741ec57634957adcac8a59b1ef27641580ad)
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/conf/domain_conf.c | 9 +++++++++
9119d9
 1 file changed, 9 insertions(+)
9119d9
9119d9
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
9119d9
index c03affe..a5f3c1d 100644
9119d9
--- a/src/conf/domain_conf.c
9119d9
+++ b/src/conf/domain_conf.c
9119d9
@@ -6824,6 +6824,15 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
9119d9
             goto error;
9119d9
         }
9119d9
         VIR_FREE(class_id);
9119d9
+    } else if (actual->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
9119d9
+        char *brname = virXPathString("string(./source/@bridge)", ctxt);
9119d9
+        if (!brname) {
9119d9
+            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
9119d9
+                           _("Missing <source> element with bridge name in "
9119d9
+                             "interface's <actual> element"));
9119d9
+            goto error;
9119d9
+        }
9119d9
+        actual->data.bridge.brname = brname;
9119d9
     }
9119d9
 
9119d9
     bandwidth_node = virXPathNode("./bandwidth", ctxt);
9119d9
-- 
9119d9
2.1.1
9119d9