[libvirt] [Patch] Fix network driver not to forget to save <domain/> in network XML file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that libvirt network driver can understand /network/domain
element but it does not save this configuration into the network
definition XML file correctly (looks completely forgetting about it).

Here is a fix for this problem.

(see also: rhbz#505720)

---
 src/network_conf.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/network_conf.c b/src/network_conf.c
index 1e0cbb8..1b50b84 100644
--- a/src/network_conf.c
+++ b/src/network_conf.c
@@ -592,6 +592,9 @@ char *virNetworkDefFormat(virConnectPtr conn,
                       def->stp ? "on" : "off",
                       def->delay);
 
+    if (def->domain)
+        virBufferVSprintf(&buf, "  <domain name='%s'/>\n", def->domain);
+
     if (def->ipAddress || def->netmask) {
         virBufferAddLit(&buf, "  <ip");
 
-- 
1.6.3.2

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]