qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix TAP networking on host kernels without IFF_VNET


From: Pierre Riteau
Subject: [Qemu-devel] [PATCH] Fix TAP networking on host kernels without IFF_VNET_HDR support
Date: Tue, 24 Nov 2009 10:06:33 +0100

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 <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]