From b9adce2c833fae930f5bede2b8a3357697984e8c Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 18 Jun 2009 18:21:30 +0100 Subject: [PATCH] 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 --- net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net.c b/net.c index cea545e4c0..eb26cd4656 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); -- 2.11.0