Skip to contentSkip to conversation

QemuOpts changes breaks multiple nic options

DISCUSSION Tom Lendacky 2 participants 2 messages Oct 12, 2009 – Oct 13, 2009 KVM

lore
Share & tools
lore
#0 lore raw

The recent change to QemuOpts for the -net nic option breaks specifying -net nic,... more than once. The net_init_nic function's return value in net.c is a table index, which is non-zero after the first time it is called. The qemu_opts_foreach function in qemu-option.c receives the non-zero return value and stops processing further -net options (like associated -net tap options). It looks like the usb net function makes use of the index value, so the fix might best be to have qemu_opts_foreach check for a return code < 0 as being an error?

Tom Lendacky

#1 lore raw

Hi Tom,

Quoted 8 lines · Tom Lendacky

The recent change to QemuOpts for the -net nic option breaks specifying -net nic,... more than once. The net_init_nic function's return value in net.c is a table index, which is non-zero after the first time it is called. The qemu_opts_foreach function in qemu-option.c receives the non-zero return value and stops processing further -net options (like associated -net tap options). It looks like the usb net function makes use of the index value, so the fix might best be to have qemu_opts_foreach check for a return code < 0 as being an error?

Thanks for the report; I sent a patch to qemu-devel yesterday:

http://lists.gnu.org/archive/html/qemu-devel/2009-10/msg01070.html

Cheers,
Mark.