[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 08/17] net: stream: Don't ignore EINVAL on netdev socket
From: |
David Gibson |
Subject: |
Re: [PATCH v10 08/17] net: stream: Don't ignore EINVAL on netdev socket connection |
Date: |
Thu, 6 Oct 2022 19:14:23 +1100 |
On Wed, Oct 05, 2022 at 06:20:42PM +0200, Laurent Vivier wrote:
> 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>
> ---
> net/stream.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/stream.c b/net/stream.c
> index 37965eb74e1a..26e485438718 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");
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [PATCH v10 00/17] qapi: net: add unix socket type support to netdev backend, Laurent Vivier, 2022/10/05
- [PATCH v10 01/17] net: introduce convert_host_port(), Laurent Vivier, 2022/10/05
- [PATCH v10 02/17] net: remove the @errp argument of net_client_inits(), Laurent Vivier, 2022/10/05
- [PATCH v10 06/17] qapi: net: add stream and dgram netdevs, Laurent Vivier, 2022/10/05
- [PATCH v10 09/17] net: stream: add unix socket, Laurent Vivier, 2022/10/05
- [PATCH v10 08/17] net: stream: Don't ignore EINVAL on netdev socket connection, Laurent Vivier, 2022/10/05
- Re: [PATCH v10 08/17] net: stream: Don't ignore EINVAL on netdev socket connection,
David Gibson <=
- [PATCH v10 05/17] net: introduce qemu_set_info_str() function, Laurent Vivier, 2022/10/05
- [PATCH v10 13/17] qemu-sockets: move and rename SocketAddress_to_str(), Laurent Vivier, 2022/10/05
- [PATCH v10 12/17] net: dgram: add unix socket, Laurent Vivier, 2022/10/05
- [PATCH v10 11/17] net: dgram: move mcast specific code from net_socket_fd_init_dgram(), Laurent Vivier, 2022/10/05
- [PATCH v10 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent, Laurent Vivier, 2022/10/05
- [PATCH v10 04/17] qapi: net: introduce a way to bypass qemu_opts_parse_noisily(), Laurent Vivier, 2022/10/05
- [PATCH v10 17/17] net: stream: add QAPI events to report connection state, Laurent Vivier, 2022/10/05
- [PATCH v10 15/17] net: stream: move to QIO to enable additional parameters, Laurent Vivier, 2022/10/05
- [PATCH v10 03/17] net: simplify net_client_parse() error management, Laurent Vivier, 2022/10/05