svn commit: r362877 - stable/12/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed Jul 1 22:00:36 UTC 2020
Author: tuexen
Date: Wed Jul 1 22:00:35 2020
New Revision: 362877
URL: https://svnweb.freebsd.org/changeset/base/362877
Log:
MFC r356660:
Fix division by zero issue.
Thanks to Stas Denisov for reporting the issue for the userland stack
and providing a fix.
Modified:
stable/12/sys/netinet/sctp_cc_functions.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 21:59:18 2020 (r362876)
+++ stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 22:00:35 2020 (r362877)
@@ -1876,7 +1876,7 @@ htcp_cong_time(struct htcp *ca)
static inline uint32_t
htcp_ccount(struct htcp *ca)
{
- return (htcp_cong_time(ca) / ca->minRTT);
+ return (ca->minRTT == 0 ? htcp_cong_time(ca) : htcp_cong_time(ca) / ca->minRTT);
}
static inline void
More information about the svn-src-stable
mailing list