1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
network: 0.930
device: 0.926
other: 0.884
vnc: 0.884
graphic: 0.883
instruction: 0.869
socket: 0.861
mistranslation: 0.855
semantic: 0.852
boot: 0.743
assembly: 0.707
KVM: 0.647
[2.6] user network broken reaching foreign servers on Win64
Both on master and, starting with 2016-03-22 builds from http://qemu.weilnetz.de/w64/, user mode network can't reach foreign servers. For example, wget http://mifritscher resolves the DNS, but then the message "network target couldn't be reached" occures. 2016-03-03 works fine. I suspect the IPv6 changes. My connection is IPv4 only.
I tested via knoppix 7.6. The command line is
qemu-system-x86_64.exe -m 512 -k de --cdrom c:\Users\michaelfritscher\Downloads\linux\KNOPPIX_V7.4.2DVD-2014-09-28-DE.iso -netdev user,id=mynet0,restrict=n -device e1000,netdev=mynet0
Under Linux, it is working fine.
Another thing: if I disable ipv6, ipv4 runs still in sort of a timeout before writing Network is unreachable (ENETUNREACH), while ipv6 says this without delay (which is ok/good)
It looks like this commit caused the regression:
$ git bisect bad
c619644067f98098dcdbc951e2dda79e97560afa is the first bad commit
commit c619644067f98098dcdbc951e2dda79e97560afa
Author: Daniel P. Berrange <email address hidden>
Date: Mon Mar 7 11:19:18 2016 +0000
osdep: fix socket_error() to work with Mingw64
Here is a patch which fixes the problem.
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;
Fixed since v2.6.0-rc3 release.
|