From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHLJ2-0006WP-KH for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHLIx-0006P3-NJ for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:43 -0400 Received: from [199.232.76.173] (port=43810 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHLIw-0006Od-Tg for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:38 -0400 Received: from mail21.svc.cra.dublin.eircom.net ([159.134.118.222]:48571) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MHLIw-0008Sg-JV for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:38 -0400 From: Mark McLoughlin Date: Thu, 18 Jun 2009 18:21:30 +0100 Message-Id: <1245345696-20915-3-git-send-email-markmc@redhat.com> In-Reply-To: <1245345696-20915-2-git-send-email-markmc@redhat.com> References: <1245345696-20915-1-git-send-email-markmc@redhat.com> <1245345696-20915-2-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 2/8] net: purge queued packets in tap_cleanup() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin 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 --- net.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 0753a7c..91c08bd 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); -- 1.6.0.6