aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-05-23 15:36:53 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-05-23 15:43:31 +0200
commit46b799c0771bb80e7b2b4b9031bbb306f67ec17e (patch)
treec990aed60e50cee4620624ad833bcb2b2da5fb89 /passt.c
parent7ab1b2a97ab43ef58905801572e86b1bbb517973 (diff)
downloadpasst-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar.gz
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar.bz2
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar.lz
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar.xz
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.tar.zst
passt-46b799c0771bb80e7b2b4b9031bbb306f67ec17e.zip
passt: When probing for an existing instance, also accept ENOENT on connect()
The most common case is actually that no other instance created a socket with that name -- and that also means there is no other instance. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/passt.c b/passt.c
index 2f538e4..46eb5f6 100644
--- a/passt.c
+++ b/passt.c
@@ -104,7 +104,7 @@ static int sock_unix(int *index)
ex = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
ret = connect(ex, (const struct sockaddr *)&addr, sizeof(addr));
- if (!ret || errno != ECONNREFUSED) {
+ if (!ret || (errno != ENOENT && errno != ECONNREFUSED)) {
close(ex);
continue;
}