[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/26] net: stream: Don't ignore EINVAL on netdev socket connectio
From: |
Jason Wang |
Subject: |
[PULL 18/26] net: stream: Don't ignore EINVAL on netdev socket connection |
Date: |
Fri, 28 Oct 2022 13:48:27 +0800 |
From: Stefano Brivio <sbrivio@redhat.com>
Other errors are treated as failure by net_stream_client_init(),
but if connect() returns EINVAL, we'll fail silently. Remove the
related exception.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
[lvivier: applied to net/stream.c]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/stream.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/stream.c b/net/stream.c
index 0a7e847..e4388fe 100644
--- a/net/stream.c
+++ b/net/stream.c
@@ -360,8 +360,7 @@ static int net_stream_client_init(NetClientState *peer,
if (errno == EINTR || errno == EWOULDBLOCK) {
/* continue */
} else if (errno == EINPROGRESS ||
- errno == EALREADY ||
- errno == EINVAL) {
+ errno == EALREADY) {
break;
} else {
error_setg_errno(errp, errno, "can't connect socket");
--
2.7.4
- [PULL 07/26] vhost: allocate event_idx fields on vring, (continued)
- [PULL 07/26] vhost: allocate event_idx fields on vring, Jason Wang, 2022/10/28
- [PULL 08/26] vhost: toggle device callbacks using used event idx, Jason Wang, 2022/10/28
- [PULL 09/26] vhost: use avail event idx on vhost_svq_kick, Jason Wang, 2022/10/28
- [PULL 11/26] net: introduce convert_host_port(), Jason Wang, 2022/10/28
- [PULL 13/26] net: simplify net_client_parse() error management, Jason Wang, 2022/10/28
- [PULL 12/26] net: remove the @errp argument of net_client_inits(), Jason Wang, 2022/10/28
- [PULL 14/26] qapi: net: introduce a way to bypass qemu_opts_parse_noisily(), Jason Wang, 2022/10/28
- [PULL 15/26] net: introduce qemu_set_info_str() function, Jason Wang, 2022/10/28
- [PULL 16/26] qapi: net: add stream and dgram netdevs, Jason Wang, 2022/10/28
- [PULL 17/26] net: socket: Don't ignore EINVAL on netdev socket connection, Jason Wang, 2022/10/28
- [PULL 18/26] net: stream: Don't ignore EINVAL on netdev socket connection,
Jason Wang <=
- [PULL 19/26] net: stream: add unix socket, Jason Wang, 2022/10/28
- [PULL 20/26] net: dgram: make dgram_dst generic, Jason Wang, 2022/10/28
- [PULL 21/26] net: dgram: move mcast specific code from net_socket_fd_init_dgram(), Jason Wang, 2022/10/28
- [PULL 22/26] net: dgram: add unix socket, Jason Wang, 2022/10/28
- [PULL 25/26] net: stream: move to QIO to enable additional parameters, Jason Wang, 2022/10/28
- [PULL 24/26] qemu-sockets: update socket_uri() and socket_parse() to be consistent, Jason Wang, 2022/10/28
- [PULL 23/26] qemu-sockets: move and rename SocketAddress_to_str(), Jason Wang, 2022/10/28
- [PULL 26/26] net: stream: add QAPI events to report connection state, Jason Wang, 2022/10/28
- Re: [PULL 00/26] Net patches, Stefan Hajnoczi, 2022/10/31