diff mbox

[08/17] Clear tap features on initialization

Message ID 1242574999-20887-9-git-send-email-aliguori@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anthony Liguori May 17, 2009, 3:43 p.m. UTC
From: Avi Kivity <avi@redhat.com>

tap features change how tap interprets data, so they must be cleared on
initialization to prevent old settings from interfering with new guest
instances.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff mbox

Patch

diff --git a/net.c b/net.c
index 08cd8c1..d8fb759 100644
--- a/net.c
+++ b/net.c
@@ -945,6 +945,7 @@  static TAPState *net_tap_fd_init(VLANState *vlan,
 #endif
 #ifdef TUNSETOFFLOAD
     s->vc->set_offload = tap_set_offload;
+    tap_set_offload(s->vc, 0, 0, 0, 0);
 #endif
     qemu_set_fd_handler2(s->fd, tap_can_send, tap_send, NULL, s);
     snprintf(s->vc->info_str, sizeof(s->vc->info_str), "fd=%d", fd);