Date: Sun, 12 Jan 2020 15:45:27 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356660 - head/sys/netinet Message-ID: <202001121545.00CFjRwU097802@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Sun Jan 12 15:45:27 2020 New Revision: 356660 URL: https://svnweb.freebsd.org/changeset/base/356660 Log: Fix division by zero issue. Thanks to Stas Denisov for reporting the issue for the userland stack and providing a fix. MFC after: 3 days Modified: head/sys/netinet/sctp_cc_functions.c Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Sun Jan 12 14:25:44 2020 (r356659) +++ head/sys/netinet/sctp_cc_functions.c Sun Jan 12 15:45:27 2020 (r356660) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001121545.00CFjRwU097802>