-net socket,connect/listen does not work in 2.7.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using 2.7.0 release on Debian Sid. What I did: start one VM with:
----
/home/pierre/
-smp 4 \
-cpu Nehalem \
-soundhw ac97 \
-k fr \
-localtime \
-enable-kvm \
-m 4099 \
-drive file=/mnt/
-cdrom /mnt/virtualMac
-boot order=c,
-vga std \
-serial mon:stdio \
-net nic,vlan=
-net user,vlan=
-net nic,vlan=
-net socket,
----
Start another one with:
----
/home/pierre/
-smp 4 \
-cpu Nehalem \
-soundhw ac97 \
-k fr \
-localtime \
-enable-kvm \
-m 4099 \
-drive file=/mnt/
-cdrom /mnt/virtualMac
-boot order=c \
-serial mon:stdio \
-vga std \
-net nic,vlan=
-net socket,
----
The network settings of the first machine are:
----
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,
link/ether 52:54:00:12:34:58 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
4: br0: <BROADCAST,
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.9/24 brd 10.0.2.255 scope global br0
valid_lft forever preferred_lft forever
----
The network settings on the second machine are:
----
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,
link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.10/24 brd 10.0.2.255 scope global enp0s3
valid_lft forever preferred_lft forever
----
typing "ping -c 1 10.0.2.10" on the first machine returns:
----
PING 10.0.2.10 (10.0.2.10): 56 data bytes
92 bytes from virtuallfs (10.0.2.9): Destination Host Unreachable
--- 10.0.2.10 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
----
and something similar when typing "ping -c 1 10.0.2.9" on the second machine.
This very same setting works as expected in version 2.6.0. I could bisect, and the offending commit is 16a3df403b1:
----
commit 16a3df403b10c4a
Author: Zhang Chen <email address hidden>
Date: Fri May 13 15:35:19 2016 +0800
net/net: Add SocketReadState for reuse codes
This function is from net/socket.c, move it to net.c and net.h.
Add SocketReadState to make others reuse net_fill_rstate().
suggestion from jason.
v4:
- move 'rs->finalize = finalize' to rs_init()
v3:
- remove SocketReadState init callback
- put finalize callback to net_fill_rstate()
v2:
- rename ReadState to SocketReadState
- add SocketReadState init and finalize callback
v1:
- init patch
Signed-off-by: Zhang Chen <email address hidden>
Signed-off-by: Li Zhijian <email address hidden>
Signed-off-by: Wen Congyang <email address hidden>
Signed-off-by: Jason Wang <email address hidden>
----
BTW, the systems on both VM are built from http://
The patch for this issue is here:
https:/ /lists. gnu.org/ archive/ html/qemu- devel/2016- 11/msg00811. html