Группа :: Мониторинг
Пакет: iperf3
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: iperf3-3.10-idle-tcp-DoS.patch
Скачать
Скачать
Idle TCP connection hangs/DoSes the server
https://github.com/esnet/iperf/issues/788
diff -Nur iperf-3.10.old/src/iperf_server_api.c iperf-3.10/src/iperf_server_api.c
--- iperf-3.10.old/src/iperf_server_api.c 2021-05-27 02:13:00.000000000 +0400
+++ iperf-3.10/src/iperf_server_api.c 2021-10-31 15:15:36.761797841 +0400
@@ -130,6 +130,12 @@
return -1;
}
+ struct timeval timeout;
+ timeout.tv_sec = 5;
+ timeout.tv_usec = 0;
+ setsockopt (s, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(timeout));
+ setsockopt (s, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout, sizeof(timeout));
+
if (Nread(test->ctrl_sck, test->cookie, COOKIE_SIZE, Ptcp) < 0) {
i_errno = IERECVCOOKIE;
return -1;