]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tcp: Make error handling in tcp_usr_send() more consistent
authorMark Johnston <markj@FreeBSD.org>
Fri, 21 May 2021 21:44:40 +0000 (17:44 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 4 Jun 2021 01:01:33 +0000 (21:01 -0400)
commit0f05c6f3a5274d07f17e7e2ca5a7d286ae37c09b
tree325bf3cf26b27938db1f56a8ba5d429faa9b1b90
parent14bc67f1e78806c683df8d7ae65d14db8216d5a3
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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7d2608a5d24ec3534dad7f24191f12a8181ea206)
sys/netinet/tcp_usrreq.c