From: Mark McLoughlin Date: Thu, 18 Jun 2009 17:21:30 +0000 (+0100) Subject: net: purge queued packets in tap_cleanup() X-Git-Tag: TizenStudio_2.0_p2.3~8597 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db2f139041586398a0a69a9a046737ebcead1922;p=sdk%2Femulator%2Fqemu.git net: purge queued packets in tap_cleanup() If tap has any packets queued at host_net_remove time, it needs to purge them in order to prevent a sent callback being invoked for it. Signed-off-by: Mark McLoughlin Signed-off-by: Anthony Liguori --- diff --git a/net.c b/net.c index cea545e..eb26cd4 100644 --- a/net.c +++ b/net.c @@ -1128,6 +1128,8 @@ static void tap_cleanup(VLANClientState *vc) { TAPState *s = vc->opaque; + qemu_purge_queued_packets(vc); + if (s->down_script[0]) launch_script(s->down_script, s->down_script_arg, s->fd);