You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vsock: Fix TCP connection bug - add ConnectedUnconfirmed proxy state
Add another state to the Proxy trait called ConnectedUnconfirmed. This is used
when when the socket is connected (on the host), but confirm_connect hasn't
been called yet. Make the TCP implementation use this new transitional
state fixing the described bug:
`libkrun` connects to the TCP socket on the host (this action is done upon the
TSI_CONNECT request), but the guest is not yet connected to stream vsock socket
corresponding to the actual transport for that connection. (We have not called
`confirm_connect`). The problem is that since we assume the guest is already
connected we attempt to recv in process_event. Which can cause the
VSOCK_OP_CREDIT_REQUEST to be sent the guest, but the guest is expecting a
VSOCK_OP_RESPONSE as a response to a connection request. This makes the guest
kernel return EPROTO from the connect syscall.
(specifically EPROTO is returned from the `virtio_transport_recv_connecting`
in `net/vmw_vsock/virtio_transport_common.c`)
Signed-off-by: Matej Hrica <[email protected]>
0 commit comments