From d187bdefaa63d138be66099df8ab18ffe58551b1 Mon Sep 17 00:00:00 2001 From: Zach Dworkin Date: Fri, 29 Mar 2024 16:40:49 -0700 Subject: [PATCH] fabtests: Add backlog > 0 to listen call Currently the listen() call has a 0 value for backlog. This causes syn (synchronize) flooding on port 3000. Port 3000 is used by fabtests for OOO (out of bounds) exchanges. This call needs to have a non-zero positive value for backlog to prevent this flooding. Setting the backlog is necessary so that it is changeable by the user and not hidden values that users must set at the kernel level. The kernel variables are called net.ipv4.tcp_max_syn_backlog, and net.core.somaxconn to fix the issue instead. However, it is encouraged that a user make sure all of these values are set appropriately as well as using an adequate size for backlog in the listen call. Signed-off-by: Zach Dworkin --- fabtests/common/shared.c | 2 +- fabtests/component/sock_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fabtests/common/shared.c b/fabtests/common/shared.c index fc228f4d89d..a8bf16ddcc0 100644 --- a/fabtests/common/shared.c +++ b/fabtests/common/shared.c @@ -3804,7 +3804,7 @@ int ft_sock_listen(char *node, char *service) goto out; } - ret = listen(listen_sock, 0); + ret = listen(listen_sock, 511); if (ret) perror("listen"); diff --git a/fabtests/component/sock_test.c b/fabtests/component/sock_test.c index abd9a999090..4a7ed4b9435 100755 --- a/fabtests/component/sock_test.c +++ b/fabtests/component/sock_test.c @@ -113,7 +113,7 @@ static int start_server(void) goto close; } - ret = listen(listen_sock, 0); + ret = listen(listen_sock, 511); if (ret) { FT_PRINTERR("listen", -errno); goto close;