qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix TAP networking on host kernels without IFF_VNET_HDR support
@ 2009-11-24  9:06 Pierre Riteau
  2009-11-24 10:05 ` [Qemu-devel] [PATCH] net: initialize vnet_hdr in net_tap_init() Mark McLoughlin
  2009-11-24 10:28 ` [Qemu-devel] Re: [PATCH] Fix TAP networking on host kernels without IFF_VNET_HDR support Mark McLoughlin
  0 siblings, 2 replies; 8+ messages in thread
From: Pierre Riteau @ 2009-11-24  9:06 UTC (permalink / raw)
  To: qemu-devel, Mark McLoughlin; +Cc: 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 <Pierre.Riteau@irisa.fr>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-11-25  8:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-24  9:06 [Qemu-devel] [PATCH] Fix TAP networking on host kernels without IFF_VNET_HDR support Pierre Riteau
2009-11-24 10:05 ` [Qemu-devel] [PATCH] net: initialize vnet_hdr in net_tap_init() Mark McLoughlin
2009-11-24 10:24   ` Pierre Riteau
2009-11-24 10:28 ` [Qemu-devel] Re: [PATCH] Fix TAP networking on host kernels without IFF_VNET_HDR support Mark McLoughlin
2009-11-24 11:17   ` Pierre Riteau
2009-11-24 11:22     ` Mark McLoughlin
2009-11-24 21:27       ` Pierre Riteau
2009-11-25  8:55         ` Mark McLoughlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).