Fix a problem when getting snd_cwnd on FreeBSD.
On FreeBSD, unlike Linux (and NetBSD?) snd_cwnd is expressed in octets instead of segments. Hilarity ensued when we erroneously multiplied by snd_mss and integer overflows occureed. Possible fix for #465, #475, #338. Testing from FreeBSD users appreciated.
Этот коммит содержится в:
родитель
13ff67e582
Коммит
b9478db947
@ -135,7 +135,7 @@ get_snd_cwnd(struct iperf_interval_results *irp)
|
||||
#if defined(linux) && defined(TCP_MD5SIG)
|
||||
return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
|
||||
#elif defined(__FreeBSD__) && __FreeBSD_version >= 600000
|
||||
return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
|
||||
return irp->tcpInfo.tcpi_snd_cwnd;
|
||||
#elif defined(__NetBSD__) && defined(TCP_INFO)
|
||||
return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
|
||||
#else
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user