svn commit: r360758 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu May 7 03:01:01 UTC 2020
Author: tuexen
Date: Thu May 7 03:01:01 2020
New Revision: 360758
URL: https://svnweb.freebsd.org/changeset/base/360758
Log:
MFC r356660: Avoid division by zero
Fix division by zero issue.
Thanks to Stas Denisov for reporting the issue for the userland stack
and providing a fix.
Modified:
stable/11/sys/netinet/sctp_cc_functions.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/11/sys/netinet/sctp_cc_functions.c Thu May 7 02:57:33 2020 (r360757)
+++ stable/11/sys/netinet/sctp_cc_functions.c Thu May 7 03:01:01 2020 (r360758)
@@ -1874,7 +1874,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-all
mailing list