diff options
| author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 15:03:58 +0000 |
|---|---|---|
| committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 15:03:58 +0000 |
| commit | 3450df304d6f6ad279a8c9ae98984898ea737a44 (patch) | |
| tree | 415eaf145fa696393a7c594990933b7e39b6b10a /savevm.c | |
| parent | 457772e68f83ea02a33b58a70bd25ec5c028c077 (diff) | |
| download | focaccia-qemu-3450df304d6f6ad279a8c9ae98984898ea737a44.tar.gz focaccia-qemu-3450df304d6f6ad279a8c9ae98984898ea737a44.zip | |
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 <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6844 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'savevm.c')
| -rw-r--r-- | savevm.c | 4 |
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) { |