From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiA69-0000nT-OJ for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiA68-0000mW-40 for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:19:01 -0400 Received: from [199.232.76.173] (port=36245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiA67-0000mP-TS for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:18:59 -0400 Received: from savannah.gnu.org ([199.232.41.3]:38026 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 1LiA67-00029c-LU for qemu-devel@nongnu.org; Fri, 13 Mar 2009 12:18:59 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LiA66-0006BB-Cp for qemu-devel@nongnu.org; Fri, 13 Mar 2009 16:18:58 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LiA65-0006B6-PI for qemu-devel@nongnu.org; Fri, 13 Mar 2009 16:18:58 +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 16:18:57 +0000 Subject: [Qemu-devel] [6846] 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: 6846 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6846 Author: aliguori Date: 2009-03-13 16:18:57 +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: -------------- branches/stable_0_10_0/savevm.c Modified: branches/stable_0_10_0/savevm.c =================================================================== --- branches/stable_0_10_0/savevm.c 2009-03-13 15:04:02 UTC (rev 6845) +++ branches/stable_0_10_0/savevm.c 2009-03-13 16:18:57 UTC (rev 6846) @@ -118,7 +118,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) {