1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-09 00:55:35 +02:00

tcp: Actually enforce MAX_CONNS limit

and, given that the connection table is indexed by socket number,
we also need to increase MAX_CONNS now as the ICMP implementation
needs 2^17 sockets, that will be opened before TCP connections are
accepted.

This needs to be changed later: the connection table should be
indexed by a translated number -- we're wasting 2^17 table entries
otherwise. Move initialisation of TCP listening sockets as last
per-protocol initialisation, this will make it easier.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-05-21 11:14:50 +02:00
parent d303cfdd55
commit bd5aaaac7f
2 changed files with 12 additions and 2 deletions

View file

@ -787,7 +787,7 @@ int main(int argc, char **argv)
fd_unix = sock_unix();
if (icmp_sock_init(&c) || tcp_sock_init(&c) || udp_sock_init(&c))
if (icmp_sock_init(&c) || udp_sock_init(&c) || tcp_sock_init(&c))
exit(EXIT_FAILURE);
if (c.v6)