lwip plugin: support large backlog values

iperf, e.g., uses INT_MAX as backlog argument to the listen() call

Fixes genodelabs/genode#4341
This commit is contained in:
Johannes Schlatow 2021-12-07 09:42:28 +01:00 committed by Christian Helmuth
parent 79e69a5549
commit 2e1a1c199e

View File

@ -1547,9 +1547,9 @@ class Lwip::Tcp_socket_dir final :
break;
case Lwip_file_handle::LISTEN:
if ((state == BOUND) && (count < 7)) {
if ((state == BOUND) && (count < 11)) {
unsigned long backlog = TCP_DEFAULT_LISTEN_BACKLOG;
char buf[8];
char buf[12];
copy_cstring(buf, src, min(count+1, sizeof(buf)));
Genode::ascii_to_unsigned(buf, backlog, 10);