Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Li8vZ-0001tF-LL for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Li8vY-0001rH-Hc for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:00 -0400 Received: from [199.232.76.173] (port=40808 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li8vY-0001qt-BL for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:00 -0400 Received: from savannah.gnu.org ([199.232.41.3]:41766 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li8vX-00088u-Vq for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:04:00 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Li8vX-0008D2-BN for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:03:59 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Li8vW-0008Cy-V4 for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:03:59 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 13 Mar 2009 15:03:59 +0000 Subject: [Qemu-devel] [6844] make qemu_announce_self handle non contiguous net tables ( Marcelo Tosatti) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6844 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6844 Author: aliguori Date: 2009-03-13 15:03:58 +0000 (Fri, 13 Mar 2009) Log Message: ----------- make qemu_announce_self handle non contiguous net tables (Marcelo Tosatti) With hotplug nd_table might contain holes. Noticed by Eduardo Habkost. Signed-off-by: Marcelo Tosatti Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/savevm.c Modified: trunk/savevm.c =================================================================== --- trunk/savevm.c 2009-03-13 15:03:27 UTC (rev 6843) +++ trunk/savevm.c 2009-03-13 15:03:58 UTC (rev 6844) @@ -122,7 +122,9 @@ VLANClientState *vc; uint8_t buf[256]; - for (i = 0; i < nb_nics; i++) { + for (i = 0; i < MAX_NICS; i++) { + if (!nd_table[i].used) + continue; len = announce_self_create(buf, nd_table[i].macaddr); vlan = nd_table[i].vlan; for(vc = vlan->first_client; vc != NULL; vc = vc->next) {