HomeFreeBSD

tcp: prevent div by zero in cc_htcp

Description

tcp: prevent div by zero in cc_htcp

Make sure the divident is at least one. While cwnd should
never be smaller than t_maxseg, this can happen during
Path MTU Discovery, or when TCP options are considered
in other parts of the stack.

PR: 276674
MFC after: 3 days
Reviewed By: tuexen, transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43797

(cherry picked from commit 38983d40c18ec5705dcba19ac320b86c5efe8e7e)

Details

Provenance
rscheffAuthored on Feb 24 2024, 3:35 PM
Reviewer
transport
Differential Revision
D43797: tcp: prevent div by zero in cc_htcp
Parents
rGfe5468bdf404: kern_racct.c: Don't compile if RACCT undefined
Branches
Unknown
Tags
Unknown