aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-06-18 18:21:30 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:15:30 -0500
commitb9adce2c833fae930f5bede2b8a3357697984e8c (patch)
tree0b5ca703ebf04963a012d4704da6dc840cc6c780
parent8cad55161c98b95deacdb9c1a66980f5b24d3179 (diff)
downloadqemu-b9adce2c833fae930f5bede2b8a3357697984e8c.zip
qemu-b9adce2c833fae930f5bede2b8a3357697984e8c.tar.gz
qemu-b9adce2c833fae930f5bede2b8a3357697984e8c.tar.bz2
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 <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--net.c2
1 files changed, 2 insertions, 0 deletions
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);