All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] net: fix vnet_hdr bustage with slirp
@ 2009-08-07  8:47 Mark McLoughlin
  2009-08-07 11:51 ` Arnd Bergmann
  2009-08-09  9:53 ` Avi Kivity
  0 siblings, 2 replies; 5+ messages in thread
From: Mark McLoughlin @ 2009-08-07  8:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, Mark McLoughlin

slirp has started using VLANClientState::opaque and this has caused the
kvm specific tap_has_vnet_hdr() hack to break because we blindly use
this opaque pointer even if it is not a tap client.

Add yet another hack to check that we're actually getting called with a
tap client.

[Needed on stable-0.11 too]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 net.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net.c b/net.c
index c7702f8..2428f63 100644
--- a/net.c
+++ b/net.c
@@ -1521,6 +1521,9 @@ int tap_has_vnet_hdr(void *opaque)
     VLANClientState *vc = opaque;
     TAPState *s = vc->opaque;
 
+    if (vc->receive != tap_receive)
+        return 0;
+
     return s ? s->has_vnet_hdr : 0;
 }
 
@@ -1529,6 +1532,9 @@ void tap_using_vnet_hdr(void *opaque, int using_vnet_hdr)
     VLANClientState *vc = opaque;
     TAPState *s = vc->opaque;
 
+    if (vc->receive != tap_receive)
+        return;
+
     if (!s || !s->has_vnet_hdr)
         return;
 
-- 
1.6.2.5


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

end of thread, other threads:[~2009-08-09  9:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-07  8:47 [PATCH 1/1] net: fix vnet_hdr bustage with slirp Mark McLoughlin
2009-08-07 11:51 ` Arnd Bergmann
2009-08-07 12:19   ` Mark McLoughlin
2009-08-07 13:20     ` Arnd Bergmann
2009-08-09  9:53 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.