提交 3450df30 编写于 作者: A aliguori

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: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6844 c046a42c-6fe2-441c-8c8c-71466251a162
上级 457772e6
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册