Date: Thu, 7 May 2020 03:01:01 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360758 - stable/11/sys/netinet Message-ID: <202005070301.047311NQ017297@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005070301.047311NQ017297>