diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-05-23 15:36:53 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-05-23 15:43:31 +0200 |
commit | 46b799c0771bb80e7b2b4b9031bbb306f67ec17e (patch) | |
tree | c990aed60e50cee4620624ad833bcb2b2da5fb89 | |
parent | 7ab1b2a97ab43ef58905801572e86b1bbb517973 (diff) | |
download | passt-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>
-rw-r--r-- | passt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |