mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix the check for an empty send socket buffer on a TOE TLS socket.
Compare sbavail() with the cached sb_off of already-sent data instead of always comparing with zero. This will correctly close the connection and send the FIN if the socket buffer contains some previously-sent data but no unsent data. Reported by: Harsh Jain @ Chelsio Sponsored by: Chelsio Communications
This commit is contained in:
parent
02d2bcfaba
commit
6b02bb1aa7
1 changed files with 2 additions and 1 deletions
|
|
@ -1175,7 +1175,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb *toep, int drop)
|
|||
* Send a FIN if requested, but only if there's no
|
||||
* more data to send.
|
||||
*/
|
||||
if (sbavail(sb) == 0 && toep->flags & TPF_SEND_FIN) {
|
||||
if (sbavail(sb) == tls_ofld->sb_off &&
|
||||
toep->flags & TPF_SEND_FIN) {
|
||||
if (sowwakeup)
|
||||
sowwakeup_locked(so);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue