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

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

On Mon, Jun 29, 2009 at 02:32:20AM +0900, Satoru SATOH wrote:
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)
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, Jun 29, 2009 at 02:32:20AM +0900, Satoru SATOH wrote:
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)
Yup, applied too, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Satoru SATOH