From c3febae62b646b5bc7aa88b7cffa88160162a94e Mon Sep 17 00:00:00 2001
From: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Date: Mon, 21 Feb 2011 14:47:50 +0300
Subject: [PATCH] Fixing tap adapter for win32

   This fix allows connection of internal VLAN to the external TAP interface.
If tap_win32_write function always returns 0, the TAP network interface
in QEMU is disabled.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 net/tap-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tap-win32.c b/net/tap-win32.c
index 081904e8d7..596132e272 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -480,7 +480,7 @@ static int tap_win32_write(tap_win32_overlapped_t *overlapped,
         }
     }
 
-    return 0;
+    return write_size;
 }
 
 static DWORD WINAPI tap_win32_thread_entry(LPVOID param)