]> git.proxmox.com Git - qemu.git/commit
slirp: Fix requeuing of batchq packets in if_start
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 17 Feb 2012 15:26:38 +0000 (16:26 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Mon, 27 Feb 2012 13:54:49 +0000 (14:54 +0100)
commitb248ede2ef2792d364bd305e5e92e24921c924a8
tree4bd6012bdbd243fcd432d4dfae2e75a64c19facd
parent79e7e937bd59ba8c4caaa08963712df2506adf8b
slirp: Fix requeuing of batchq packets in if_start

In case we requeued a packet that was the head of a longer session
queue, we failed to restore this ordering. Also, we did not properly
deal with changes to Slirp::next_m.

Instead of a cumbersome roll back, this fix simply avoids any changes
until we know if the packet was actually sent. Both fixes crashes due
to inconsistent queues and simplifies the logic.

Thanks to Zhi Yong Wu who found the reason for these crashes.

CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
CC: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp/if.c