diff options
author | Andrew Baumann <Andrew.Baumann@microsoft.com> | 2015-11-18 11:45:09 -0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2015-11-27 10:39:55 +0800 |
commit | b73c1849148da1229a3c3b336311a8194970b35f (patch) | |
tree | 2a1fbe4264ff8022814af20a6924eb32beaa7746 /fsdev | |
parent | ee0428e3acd237e4d555cc54134cea473cab5ee7 (diff) |
tap-win32: disable broken async write path
The code under the TUN_ASYNCHRONOUS_WRITES path makes two incorrect
assumptions about the behaviour of the WriteFile API for overlapped
file handles. First, WriteFile does not update the
lpNumberOfBytesWritten parameter when the write completes
asynchronously (the number of bytes written is known only when the
operation completes). Second, the buffer shouldn't be touched (or
freed) until the operation completes. This led to at least one bug
where tap_win32_write returned zero bytes written, which in turn
caused further writes ("receives") to be disabled for that device.
This change disables the asynchronous write path, while keeping most
of the code around in case someone sees value in resurrecting it. It
also adds some conditional debug output, similar to the read path.
Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Acked-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'fsdev')
0 files changed, 0 insertions, 0 deletions