From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDMym-0007S5-TV for qemu-devel@nongnu.org; Wed, 25 Nov 2009 13:52:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDMyc-0007Kr-8v for qemu-devel@nongnu.org; Wed, 25 Nov 2009 13:52:36 -0500 Received: from [199.232.76.173] (port=49018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDMyc-0007KZ-1k for qemu-devel@nongnu.org; Wed, 25 Nov 2009 13:52:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63973) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDMyb-0000G0-Cr for qemu-devel@nongnu.org; Wed, 25 Nov 2009 13:52:29 -0500 From: Mark McLoughlin Date: Wed, 25 Nov 2009 18:49:34 +0000 Message-Id: <1259174977-26212-42-git-send-email-markmc@redhat.com> In-Reply-To: <1259174977-26212-1-git-send-email-markmc@redhat.com> References: <1259174977-26212-1-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 41/44] net: fix TAP networking on host kernels without IFF_VNET_HDR support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin , Pierre Riteau From: Pierre Riteau vnet_hdr is initialized at 1 by default. We need to reset it to 0 if the kernel doesn't support IFF_VNET_HDR. Signed-off-by: Pierre Riteau Signed-off-by: Mark McLoughlin --- net/tap-linux.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 0f621a2..e4f7e27 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -52,6 +52,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required features & IFF_VNET_HDR) { *vnet_hdr = 1; ifr.ifr_flags |= IFF_VNET_HDR; + } else { + *vnet_hdr = 0; } if (vnet_hdr_required && !*vnet_hdr) { -- 1.6.5.2