mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
tcp_output: Clear FIN if tcp_m_copym truncates output length
Reviewed by: rscheff, tuexen, gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46824 (cherry picked from commit 519981e3c09c2875b136635459c87ab24d3104e2)
This commit is contained in:
parent
09cfc202bc
commit
1a264ff0cc
1 changed files with 5 additions and 0 deletions
|
|
@ -1088,13 +1088,18 @@ send:
|
|||
sbsndptr_adv(&so->so_snd, mb, len);
|
||||
m->m_len += len;
|
||||
} else {
|
||||
int32_t old_len;
|
||||
|
||||
if (SEQ_LT(tp->snd_nxt, tp->snd_max))
|
||||
msb = NULL;
|
||||
else
|
||||
msb = &so->so_snd;
|
||||
old_len = len;
|
||||
m->m_next = tcp_m_copym(mb, moff,
|
||||
&len, if_hw_tsomaxsegcount,
|
||||
if_hw_tsomaxsegsize, msb, hw_tls);
|
||||
if (old_len != len)
|
||||
flags &= ~TH_FIN;
|
||||
if (len <= (tp->t_maxseg - optlen)) {
|
||||
/*
|
||||
* Must have ran out of mbufs for the copy
|
||||
|
|
|
|||
Loading…
Reference in a new issue