diff mbox

[Bug,1569988] Re: [2.6] user network broken reaching foreign servers on Win64

Message ID 20160414114900.4201.81003.malone@gac.canonical.com
State New
Headers show

Commit Message

Stefan Weil April 14, 2016, 11:49 a.m. UTC
Here is a patch which fixes the problem.
diff mbox

Patch

diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 2027a75..696867f 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -587,7 +587,7 @@  findso:
 
          if ((tcp_fconnect(so, so->so_ffamily) == -1) &&
 #if defined(_WIN32)
-              socket_error() != WSAEWOULDBLOCK
+              socket_error() != EAGAIN
 #else
               (errno != EINPROGRESS) && (errno != EWOULDBLOCK)
 #endif


Latest QEMU needs a slightly different patch:

diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 5433e7f..3be2d2f 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -659,6 +659,7 @@  findso:
          }
 
          if ((tcp_fconnect(so, so->so_ffamily) == -1) &&
+              socket_error() != EAGAIN &&
               (errno != EINPROGRESS) && (errno != EWOULDBLOCK)
           ) {
            uint8_t code;