Skip to content

Commit

Permalink
fabtests: Add backlog > 0 to listen call
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zachdworkin committed Apr 2, 2024
1 parent 340a4b2 commit d187bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fabtests/common/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion fabtests/component/sock_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d187bde

Please sign in to comment.