diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-03-17 10:57:45 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-03-18 12:58:07 +0100 |
commit | 8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2 (patch) | |
tree | 3d1beace28ced33b665533582dae7b0588640f5f /qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch | |
parent | 1d807fc720bda7ec446c683bbc1a5e32897ca04e (diff) | |
download | passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar.gz passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar.bz2 passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar.lz passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar.xz passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.tar.zst passt-8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2.zip |
passt: qemu patch for direct UNIX domain connection without the qrap wrapper
...and, while at it, a second patch to fail when connect() fails in turn
with EINVAL. These two patches haven't been sent upstream yet.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch')
-rw-r--r-- | qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch b/qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch new file mode 100644 index 0000000..0e2caa8 --- /dev/null +++ b/qemu/0002-net-Don-t-ignore-EINVAL-on-netdev-socket-connection.patch @@ -0,0 +1,31 @@ +From f4c9af4041754209eaad4f98041466b6f5e54902 Mon Sep 17 00:00:00 2001 +From: Stefano Brivio <sbrivio@redhat.com> +Date: Wed, 17 Mar 2021 10:35:32 +0100 +Subject: [PATCH 2/2] net: Don't ignore EINVAL on netdev socket connection + +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 9d06953983..a7c10ea2b2 100644 +--- a/net/socket.c ++++ b/net/socket.c +@@ -671,8 +671,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.28.0 + |