diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 16:18:57 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 16:18:57 +0000 |
commit | 4827c90ceff8db7de6627c57a8bb7b56daf3fc55 (patch) | |
tree | 0015f44fb5a0c76d89aa71e34abd74d533af7d08 | |
parent | 0f56231dcea933fffc082735e02a52f339fc8d7c (diff) |
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/branches/stable_0_10_0@6846 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | savevm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -118,7 +118,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) { |