qemu-e2k/net
Daniel P. Berrange e79cd40680 net: fix sending of data with -net socket, listen backend
The use of -net socket,listen was broken in the following
commit

  commit 16a3df403b
  Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
  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.

This refactored the state out of NetSocketState into a
separate SocketReadState. This refactoring requires
that a callback is provided to be triggered upon
completion of a packet receive from the guest.

The patch only registered this callback in the codepaths
hit by -net socket,connect, not -net socket,listen. So
as a result packets sent by the guest in the latter case
get dropped on the floor.

This bug is hidden because net_fill_rstate() silently
does nothing if the callback is not set.

This patch adds in the middle callback registration
and also adds an assert so that QEMU aborts if there
are any other codepaths hit which are missing the
callback.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2016-11-15 15:36:21 +08:00
..
checksum.c
clients.h
colo-compare.c trivial patches for 2016-10-28 2016-10-31 11:58:30 +00:00
colo.c filter-rewriter: rewrite tcp packet to keep secondary connection 2016-09-27 17:54:22 +08:00
colo.h filter-rewriter: rewrite tcp packet to keep secondary connection 2016-09-27 17:54:22 +08:00
dump.c
eth.c
filter-buffer.c
filter-mirror.c char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00
filter-rewriter.c colo-proxy: fix memory leak 2016-10-26 09:58:02 +08:00
filter.c qtail: clean up direct access to tqe_prev field 2016-09-13 19:08:41 +02:00
hub.c
hub.h
l2tpv3.c
Makefile.objs filter-rewriter: introduce filter-rewriter initialization 2016-09-27 17:54:22 +08:00
net.c net: fix sending of data with -net socket, listen backend 2016-11-15 15:36:21 +08:00
netmap.c
queue.c
slirp.c slirp: fix CharDriver breakage 2016-11-02 09:28:56 +01:00
socket.c net: fix sending of data with -net socket, listen backend 2016-11-15 15:36:21 +08:00
tap_int.h
tap-aix.c
tap-bsd.c tap-bsd: OpenBSD uses tap(4) now 2016-10-26 09:57:59 +08:00
tap-haiku.c
tap-linux.c
tap-linux.h
tap-solaris.c
tap-win32.c
tap.c tap: Allow specifying a bridge 2016-09-27 17:54:22 +08:00
trace-events net: split colo_compare_pkt_info into two trace events 2016-10-28 19:00:15 +01:00
util.c
util.h
vde.c
vhost-user.c char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00