aboutsummaryrefslogtreecommitdiff
path: root/net/l2tpv3.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-05-05 17:23:05 +0100
committerJason Wang <jasowang@redhat.com>2017-06-07 10:58:31 +0800
commit6701e5514beab7b781a10424a94e9850c707287c (patch)
tree754ab36ce033a94c11bc40969730a439f03fb3ff /net/l2tpv3.c
parent4cee3cf35c05c863f5acf87af915298c752eefd9 (diff)
downloadqemu-6701e5514beab7b781a10424a94e9850c707287c.zip
qemu-6701e5514beab7b781a10424a94e9850c707287c.tar.gz
qemu-6701e5514beab7b781a10424a94e9850c707287c.tar.bz2
Revert "Change net/socket.c to use socket_*() functions" again
This reverts commit 883e4f7624e10b98d16d9adaffb8b1795664d899. This code changed net/socket.c from using socket()+connect(), to using socket_connect(). In theory this is great, but in practice this has completely broken the ability to connect the frontend and backend: $ ./x86_64-softmmu/qemu-system-x86_64 \ -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05 \ -netdev socket,id=hn0,connect=localhost:1234 qemu-system-x86_64: -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05: Property 'e1000.netdev' can't find value 'hn0' The old code would call net_socket_fd_init() synchronously, while letting the connect() complete in the backgorund. The new code moved net_socket_fd_init() so that it is only called after connect() completes in the background. Thus at the time we initialize the NIC frontend, the backend does not exist. The socket_connect() conversion as done is a bad fit for the current code, since it did not try to change the way it deals with async connection completion. Rather than try to fix this, just revert the socket_connect() conversion entirely. The code is about to be converted to use QIOChannel which will let the problem be solved in a cleaner manner. This revert is more suitable for stable branches in the meantime. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/l2tpv3.c')
0 files changed, 0 insertions, 0 deletions