From 7ca0f75ae84db344455041048c41c6bec05f6147 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 28 Apr 2009 09:48:20 +0100 Subject: [PATCH] net: unbreak tap networking A recent merge broke tap networking because qemu_send_packet() now always returns -EAGAIN causing tap to try and resend the same packet forever. Fix by having qemu_send_packet() return the status from the qemu_deliver_packet() of the packet in question, rather than any packets which happened to have been queued up during the delivery of the original packet. Signed-off-by: Mark McLoughlin Signed-off-by: Avi Kivity --- net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.c b/net.c index 16f6e483c4..b5ebcead64 100644 --- a/net.c +++ b/net.c @@ -445,9 +445,9 @@ int qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size) vlan->send_queue = packet; } else { vlan->delivering = 1; - qemu_deliver_packet(vc, buf, size); + ret = qemu_deliver_packet(vc, buf, size); while ((packet = vlan->send_queue) != NULL) { - ret = qemu_deliver_packet(packet->sender, packet->data, packet->size); + qemu_deliver_packet(packet->sender, packet->data, packet->size); vlan->send_queue = packet->next; qemu_free(packet); } -- 2.11.4.GIT