diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2002-10-31 23:24:13 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2002-10-31 23:24:13 +0000 |
commit | 1645d0903ef7162f5c4516373f0c9df0501ac893 (patch) | |
tree | b10fef8ca11fc02a6f6bd5f39e9cd76599d1ba0e /sys/netinet/tcp_input.c | |
parent | 83999f5a3207aa922b5a88d815c51a48eb2ac4c7 (diff) | |
download | src-1645d0903ef7162f5c4516373f0c9df0501ac893.tar.gz src-1645d0903ef7162f5c4516373f0c9df0501ac893.zip |
- 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
Notes
Notes:
svn path=/head/; revision=106271
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6175a81a9392..32567ca96c73 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1027,7 +1027,11 @@ after_listen: 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 @@ after_listen: */ ++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 */ |