Skip to content

Commit 9d9a8fa

Browse files
authored
Skip SO_REUSEPORT for AF_UNIX sockets (#12470)
1 parent 17fcff1 commit 9d9a8fa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/iocore/net/Server.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "tscore/ink_inet.h"
3939
#include "tscore/ink_platform.h"
4040
#include "tscore/ink_sock.h"
41+
#include <sys/socket.h>
4142

4243
#if TS_USE_HWLOC
4344
#include <hwloc.h>
@@ -229,7 +230,7 @@ Server::setup_fd_for_listen(bool non_blocking, const NetProcessor::AcceptOptions
229230
goto Lerror;
230231
}
231232
listen_per_thread = RecGetRecordInt("proxy.config.exec_thread.listen").value_or(0);
232-
if (listen_per_thread == 1) {
233+
if (listen_per_thread == 1 && opt.ip_family != AF_UNIX) {
233234
if (sock.enable_option(SOL_SOCKET, SO_REUSEPORT) < 0) {
234235
goto Lerror;
235236
}

0 commit comments

Comments
 (0)