From: Pavel Hrdina Date: Thu, 18 Sep 2014 13:06:44 +0000 (+0200) Subject: Fix bug with loading bridge name for active domain during libvirtd start X-Git-Tag: v1.2.9-rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a71f741ec57634957adcac8a59b1ef27641580ad;p=thirdparty%2Flibvirt.git Fix bug with loading bridge name for active domain during libvirtd start If you have a bridge network in running domain and libvirtd is restarted the information about host bridge interface is lost from live xml. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140085 Signed-off-by: Pavel Hrdina --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9cc118c02e..0a7d0b804b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6850,6 +6850,15 @@ virDomainActualNetDefParseXML(xmlNodePtr node, goto error; } VIR_FREE(class_id); + } else if (actual->type == VIR_DOMAIN_NET_TYPE_BRIDGE) { + char *brname = virXPathString("string(./source/@bridge)", ctxt); + if (!brname) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Missing element with bridge name in " + "interface's element")); + goto error; + } + actual->data.bridge.brname = brname; } bandwidth_node = virXPathNode("./bandwidth", ctxt);