From: Mark McLoughlin <markmc@redhat.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH 1/1] net: fix vnet_hdr bustage with slirp
Date: Fri, 7 Aug 2009 09:47:31 +0100 [thread overview]
Message-ID: <1249634851-24005-1-git-send-email-markmc@redhat.com> (raw)
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
next reply other threads:[~2009-08-07 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 8:47 Mark McLoughlin [this message]
2009-08-07 11:51 ` [PATCH 1/1] net: fix vnet_hdr bustage with slirp Arnd Bergmann
2009-08-07 12:19 ` Mark McLoughlin
2009-08-07 13:20 ` Arnd Bergmann
2009-08-09 9:53 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249634851-24005-1-git-send-email-markmc@redhat.com \
--to=markmc@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.