1
1

Two fixes for a warning for possibly-too-large UDP packets.

1.  Make sure we have a valid TCP MSS on the path when comparing
the UDP block size.

2.  Fix a redundant "warning".

This should fix a bug observed on Windows but not (so far) on any
UNIX-like platforms.  Fixes #608.
Этот коммит содержится в:
Bruce A. Mah 2017-09-18 15:17:18 -07:00
родитель 4a45b32b47
Коммит d6a6751746
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4984910A8CAAEE8A

Просмотреть файл

@ -382,10 +382,11 @@ iperf_connect(struct iperf_test *test)
* Regardless of whether explicitly or implicitly set, if the
* block size is larger than the MSS, print a warning.
*/
if (test->settings->blksize > test->ctrl_sck_mss) {
if (test->settings->blksize > test->ctrl_sck_mss &&
test->ctrl_sck_mss > 0) {
char str[128];
snprintf(str, sizeof(str),
"Warning: UDP block size %d exceeds TCP MSS %d, may result in fragmentation / drops", test->settings->blksize, test->ctrl_sck_mss);
"UDP block size %d exceeds TCP MSS %d, may result in fragmentation / drops", test->settings->blksize, test->ctrl_sck_mss);
warning(str);
}
}