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

[Libvir] [PATCH] NIC should define in order



Currently NIC definition order is reversed.
If we set over 4-NICs for a domain by virt-install,
this causes a network communication problem.
This is because virtual mac to eth relation is lost.
This patch fixes the NIC definition order.

N.B.
If less than 3-NICs, this problem does not occur.

Sign-off-by: Hiroyuki Kaguchi <fj7025cf aa jp fujitsu com>

Index: xm_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xm_internal.c,v
retrieving revision 1.53
diff -u -p -r1.53 xm_internal.c
--- xm_internal.c	14 Dec 2007 15:51:42 -0000	1.53
+++ xm_internal.c	16 Jan 2008 00:43:17 -0000
@@ -2232,7 +2232,7 @@ virConfPtr xenXMParseXMLToConfig(virConn
         }
         vifs->type = VIR_CONF_LIST;
         vifs->list = NULL;
-        for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+        for (i = obj->nodesetval->nodeNr - 1; i >= 0; i--) {
             virConfValuePtr thisVif;
             char *vif = xenXMParseXMLVif(conn, obj->nodesetval->nodeTab[i], hvm);
             if (!vif)

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