diff options
| author | Jayanth Vijayaraghavan <jayanth@FreeBSD.org> | 2004-07-28 02:15:14 +0000 |
|---|---|---|
| committer | Jayanth Vijayaraghavan <jayanth@FreeBSD.org> | 2004-07-28 02:15:14 +0000 |
| commit | 5d3b1b755608211cd404e22b435c0a7498db7f4f (patch) | |
| tree | 3b799630bf83139bd6292b793a65a64582e070b7 /sys/netinet/tcp_output.c | |
| parent | e193a85e5b512da47f706a2cb5642e67795999e1 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_output.c')
| -rw-r--r-- | sys/netinet/tcp_output.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index c69b90aae8cb..5d71887a5c54 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -356,8 +356,13 @@ after_sack_rexmit: len = tp->t_maxseg; sendalot = 1; } - if (off + len < so->so_snd.sb_cc) - flags &= ~TH_FIN; + if (sack_rxmit) { + if (SEQ_LT(p->rxmit + len, tp->snd_una + so->so_snd.sb_cc)) + flags &= ~TH_FIN; + } else { + if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc)) + flags &= ~TH_FIN; + } recwin = sbspace(&so->so_rcv); @@ -1088,8 +1093,12 @@ timer: * No need to check for TH_FIN here because * the TF_SENTFIN flag handles that case. */ - if ((flags & TH_SYN) == 0) - tp->snd_nxt -= len; + if ((flags & TH_SYN) == 0) { + if (sack_rxmit) + p->rxmit -= len; + else + tp->snd_nxt -= len; + } } out: |
