Message ID | 20250128-vsock-transport-vs-autobind-v3-2-1cf57065b770@rbox.co (mailing list archive) |
---|---|
State | Accepted |
Commit | aa388c72113b7458127b709bdd7d3628af26e9b4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | vsock: Transport reassignment and error handling issues | expand |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index cfe18bc8fdbe7ced073c6b3644d635fdbfa02610..075695173648d3a4ecbd04e908130efdbb393b41 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1523,6 +1523,11 @@ static int vsock_connect(struct socket *sock, struct sockaddr *addr, if (err < 0) goto out; + /* sk_err might have been set as a result of an earlier + * (failed) connect attempt. + */ + sk->sk_err = 0; + /* Mark sock as connecting and set the error code to in * progress in case this is a non-blocking connect. */