From: Stefano Brivio <sbrivio@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Ralph Schmieder" <ralph.schmieder@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Laine Stump" <laine@redhat.com>
Subject: [PATCH 2/2] net: Don't ignore EINVAL on netdev socket connection
Date: Fri, 23 Apr 2021 17:30:45 +0200 [thread overview]
Message-ID: <a6d475147682de1fe3b14eb325f4247e013e8440.1619190878.git.sbrivio@redhat.com> (raw)
In-Reply-To: <cover.1619190878.git.sbrivio@redhat.com>
Other errors are treated as failure by net_socket_connect_init(),
but if connect() returns EINVAL, we'll fail silently. Remove the
related exception.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
net/socket.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index aadd11dae2b3..d3293ac12e82 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -644,8 +644,7 @@ static int net_socket_connect_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.29.2
next prev parent reply other threads:[~2021-04-23 15:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 15:30 [PATCH 0/2] Support for AF_UNIX -netdev socket and a small fix Stefano Brivio
2021-04-23 15:30 ` [PATCH 1/2] net: Allow also UNIX domain sockets to be used as -netdev socket Stefano Brivio
2021-04-23 15:30 ` Stefano Brivio [this message]
2021-04-23 15:39 ` [PATCH 0/2] Support for AF_UNIX -netdev socket and a small fix no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6d475147682de1fe3b14eb325f4247e013e8440.1619190878.git.sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=berrange@redhat.com \
--cc=laine@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ralph.schmieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).