qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] make qemu_announce_self handle non contiguous net tables
@ 2009-03-11 18:25 Marcelo Tosatti
  2009-03-13 16:19 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2009-03-11 18:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eduardo Habkost


With hotplug nd_table might contain holes.

Noticed by Eduardo Habkost.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: savevm.c
===================================================================
--- savevm.c	(revision 6811)
+++ savevm.c	(working copy)
@@ -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) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-13 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 18:25 [Qemu-devel] [PATCH] make qemu_announce_self handle non contiguous net tables Marcelo Tosatti
2009-03-13 16:19 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).