HomeFreeBSD

tcp: Make error handling in tcp_usr_send() more consistent

Description

tcp: Make error handling in tcp_usr_send() more consistent

  • Free the input mbuf in a single place instead of in every error path.
  • Handle PRUS_NOTREADY consistently.
  • Flush the socket's send buffer if an implicit connect fails. At that point the mbuf has already been enqueued but we don't want to keep it in the send buffer.

Reviewed by: gallatin, tuexen
Discussed with: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30349

Details

Provenance
markjAuthored on May 21 2021, 9:44 PM
Reviewer
gallatin
Differential Revision
D30349: socket: Fix error handling for pru_send(PRUS_NOTREADY)
Parents
rG6680e5a52f8a: import nvi 2.2.0-3bbdfe4
Branches
Unknown
Tags
Unknown