summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-11-26 08:18:06 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-26 08:18:06 -0600
commitf8c4382e2cfe9b28b7d652b94712d258c751627b (patch)
tree28494d552a72c37d29e2c7e8de44f49a8a709315
parent7eff57421ff31657434545104b9f91a28e7869ff (diff)
parent58ddcd50f30cb5c020bd4f9f36b01ee160a27cac (diff)
downloadqemu-f8c4382e2cfe9b28b7d652b94712d258c751627b.tar.gz
Merge remote-tracking branch 'stefanha/net' into staging
* stefanha/net: tap: reset vnet header size on open Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--net/tap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tap.c b/net/tap.c
index df89caaac6..1abfd44bd9 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -341,6 +341,13 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
s->using_vnet_hdr = 0;
s->has_ufo = tap_probe_has_ufo(s->fd);
tap_set_offload(&s->nc, 0, 0, 0, 0, 0);
+ /*
+ * Make sure host header length is set correctly in tap:
+ * it might have been modified by another instance of qemu.
+ */
+ if (tap_probe_vnet_hdr_len(s->fd, s->host_vnet_hdr_len)) {
+ tap_fd_set_vnet_hdr_len(s->fd, s->host_vnet_hdr_len);
+ }
tap_read_poll(s, 1);
s->vhost_net = NULL;
return s;