diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2c3a11fb1097fbf03370bc149fa03d545f6b98a2..52b9f0e311585a3abebf418efc5a159b9a6c901d 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2434,8 +2434,8 @@ virNetworkDefFormatBuf(virBufferPtr buf, bool hasbridge = false; virBufferAddLit(buf, "namespaceData && def->ns.href) - virBufferAsprintf(buf, " %s", (def->ns.href)()); + if (def->namespaceData && def->ns.format) + virXMLNamespaceFormatNS(buf, &def->ns); if (!(flags & VIR_NETWORK_XML_INACTIVE) && (def->connections > 0)) virBufferAsprintf(buf, " connections='%d'", def->connections); if (def->ipv6nogw) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b0ada0132a48f5efdda42ea2c2f260e97f523811..a3f7ae337aef9bec2a336efb1e2b597d357d0655 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -244,7 +244,7 @@ networkDnsmasqDefNamespaceFormatXML(virBufferPtr buf, static const char * networkDnsmasqDefNamespaceHref(void) { - return "xmlns:dnsmasq='" DNSMASQ_NAMESPACE_HREF "'"; + return DNSMASQ_NAMESPACE_HREF; }