- Consistently update snd_wl1, snd_wl2, and rcv_up in the header

prediction code.  Previously, 2GB worth of header predicted data
   could leave these variables too far out of sequence which would cause
   problems after receiving a packet that did not match the header
   prediction.

Submitted by:	Bill Baumann <bbaumann@isilon.com>
Sponsored by:	Isilon Systems, Inc.
Reviewed by:	hsu, pete@isilon.com, neal@isilon.com, aaronp@isilon.com
This commit is contained in:
Jeff Roberson 2002-10-31 23:24:13 +00:00
parent 83999f5a32
commit 1645d0903e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106271
2 changed files with 30 additions and 2 deletions

View File

@ -1027,7 +1027,11 @@ tcp_input(m, off0)
tcpstat.tcps_rcvackpack++;
tcpstat.tcps_rcvackbyte += acked;
sbdrop(&so->so_snd, acked);
tp->snd_una = th->th_ack;
/*
* pull snd_wl2 up to prevent seq wrap relative
* to th_ack.
*/
tp->snd_wl2 = tp->snd_una = th->th_ack;
tp->t_dupacks = 0;
m_freem(m);
ND6_HINT(tp); /* some progress has been done */
@ -1067,6 +1071,16 @@ tcp_input(m, off0)
*/
++tcpstat.tcps_preddat;
tp->rcv_nxt += tlen;
/*
* Pull snd_wl1 up to prevent seq wrap relative to
* th_seq.
*/
tp->snd_wl1 = th->th_seq;
/*
* Pull rcv_up up to prevent seq wrap relative to
* rcv_nxt.
*/
tp->rcv_up = tp->rcv_nxt;
tcpstat.tcps_rcvpack++;
tcpstat.tcps_rcvbyte += tlen;
ND6_HINT(tp); /* some progress has been done */

View File

@ -1027,7 +1027,11 @@ tcp_input(m, off0)
tcpstat.tcps_rcvackpack++;
tcpstat.tcps_rcvackbyte += acked;
sbdrop(&so->so_snd, acked);
tp->snd_una = th->th_ack;
/*
* pull snd_wl2 up to prevent seq wrap relative
* to th_ack.
*/
tp->snd_wl2 = tp->snd_una = th->th_ack;
tp->t_dupacks = 0;
m_freem(m);
ND6_HINT(tp); /* some progress has been done */
@ -1067,6 +1071,16 @@ tcp_input(m, off0)
*/
++tcpstat.tcps_preddat;
tp->rcv_nxt += tlen;
/*
* Pull snd_wl1 up to prevent seq wrap relative to
* th_seq.
*/
tp->snd_wl1 = th->th_seq;
/*
* Pull rcv_up up to prevent seq wrap relative to
* rcv_nxt.
*/
tp->rcv_up = tp->rcv_nxt;
tcpstat.tcps_rcvpack++;
tcpstat.tcps_rcvbyte += tlen;
ND6_HINT(tp); /* some progress has been done */