[Libvir] PATCH: Fix virtual neworks with xm driver

The virtual networks stuff was never added to the xm driver for Xen 3.0.3 or earlier. This means that if adding a virtual network the bridge device won't get defined in the config. This patch addreses this, and also fixes a tiny mem leak in the equivalent code in the xend driver. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Fri, Aug 10, 2007 at 04:36:25PM +0100, Daniel P. Berrange wrote:
The virtual networks stuff was never added to the xm driver for Xen 3.0.3 or earlier. This means that if adding a virtual network the bridge device won't get defined in the config. This patch addreses this, and also fixes a tiny mem leak in the equivalent code in the xend driver.
Looks fine, I'm just surprised by
@@ -1694,9 +1707,12 @@ static char *xenXMParseXMLVif(xmlNodePtr if (typ == 0) { strcat(buf, ",bridge="); strcat(buf, (const char*)source); - } else { - strcat(buf, ",mac="); + } else if (typ == 1) { + strcat(buf, ",dev="); strcat(buf, (const char*)source); + } else { + strcat(buf, ",bridge="); + strcat(buf, bridge); } }
So we never emit the mac definition anymore ? Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Fri, Aug 10, 2007 at 12:03:10PM -0400, Daniel Veillard wrote:
On Fri, Aug 10, 2007 at 04:36:25PM +0100, Daniel P. Berrange wrote:
The virtual networks stuff was never added to the xm driver for Xen 3.0.3 or earlier. This means that if adding a virtual network the bridge device won't get defined in the config. This patch addreses this, and also fixes a tiny mem leak in the equivalent code in the xend driver.
Looks fine, I'm just surprised by
@@ -1694,9 +1707,12 @@ static char *xenXMParseXMLVif(xmlNodePtr if (typ == 0) { strcat(buf, ",bridge="); strcat(buf, (const char*)source); - } else { - strcat(buf, ",mac="); + } else if (typ == 1) { + strcat(buf, ",dev="); strcat(buf, (const char*)source); + } else { + strcat(buf, ",bridge="); + strcat(buf, bridge); } }
So we never emit the mac definition anymore ?
The MAC is already being added further up - you just can't see it in the diff context. This hunk was just bogus. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Fri, Aug 10, 2007 at 05:06:30PM +0100, Daniel P. Berrange wrote:
On Fri, Aug 10, 2007 at 12:03:10PM -0400, Daniel Veillard wrote:
On Fri, Aug 10, 2007 at 04:36:25PM +0100, Daniel P. Berrange wrote:
The virtual networks stuff was never added to the xm driver for Xen 3.0.3 or earlier. This means that if adding a virtual network the bridge device won't get defined in the config. This patch addreses this, and also fixes a tiny mem leak in the equivalent code in the xend driver.
Looks fine, I'm just surprised by
@@ -1694,9 +1707,12 @@ static char *xenXMParseXMLVif(xmlNodePtr if (typ == 0) { strcat(buf, ",bridge="); strcat(buf, (const char*)source); - } else { - strcat(buf, ",mac="); + } else if (typ == 1) { + strcat(buf, ",dev="); strcat(buf, (const char*)source); + } else { + strcat(buf, ",bridge="); + strcat(buf, bridge); } }
So we never emit the mac definition anymore ?
The MAC is already being added further up - you just can't see it in the diff context. This hunk was just bogus.
Okidoc, +1 :-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel P. Berrange wrote:
The virtual networks stuff was never added to the xm driver for Xen 3.0.3 or earlier. This means that if adding a virtual network the bridge device won't get defined in the config. This patch addreses this, and also fixes a tiny mem leak in the equivalent code in the xend driver.
ACK. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones