summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--savevm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 6104f629ab..ce12628084 100644
--- a/savevm.c
+++ b/savevm.c
@@ -122,7 +122,9 @@ void qemu_announce_self(void)
     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) {