From: Mark McLoughlin <markmc@redhat.com>
To: Pierre Riteau <Pierre.Riteau@irisa.fr>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] net: initialize vnet_hdr in net_tap_init()
Date: Tue, 24 Nov 2009 10:05:04 +0000 [thread overview]
Message-ID: <1259057104.8935.18.camel@blaa> (raw)
In-Reply-To: <1259053593-15362-1-git-send-email-Pierre.Riteau@irisa.fr>
Hi Pierre,
On Tue, 2009-11-24 at 10:06 +0100, Pierre Riteau wrote:
> vnet_hdr is initialized at 1 by default. We need to reset it to 0 if
> the kernel doesn't support IFF_VNET_HDR.
Thanks for the patch, but I'd prefer us to make sure we catch all cases.
Does this work for you?
Thanks,
Mark.
From: Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH] net: initialize vnet_hdr in net_tap_init()
Don't assume that all tap_open() implementations will set it to
zero if VNET_HDR support isn't found.
Fixes tap networking on host kernels lacking IFF_VNET_HDR support.
Reported-by: Pierre Riteau <Pierre.Riteau@irisa.fr>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
net/tap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index d34feec..7fb9e16 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -378,7 +378,7 @@ static int net_tap_init(QemuOpts *opts, int *vnet_hdr)
int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
{
TAPState *s;
- int fd, vnet_hdr;
+ int fd, vnet_hdr = 0;
if (qemu_opt_get(opts, "fd")) {
if (qemu_opt_get(opts, "ifname") ||
--
1.6.5.2
next prev parent reply other threads:[~2009-11-24 10:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Mark McLoughlin [this message]
2009-11-24 10:24 ` [Qemu-devel] [PATCH] net: initialize vnet_hdr in net_tap_init() 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
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=1259057104.8935.18.camel@blaa \
--to=markmc@redhat.com \
--cc=Pierre.Riteau@irisa.fr \
--cc=qemu-devel@nongnu.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 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).