summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2004-11-25 19:04:20 +0000
committerMike Silbersack <silby@FreeBSD.org>2004-11-25 19:04:20 +0000
commit6a220ed80af3ba4b6e0b8fe64072b9133135c766 (patch)
treeb80df82514cc044e498de88da36afc62df7155a6
parenta4c40dd85d26648381e631b7d130caa3f921a8b6 (diff)
Notes
-rw-r--r--sys/netinet/tcp_input.c5
-rw-r--r--sys/netinet/tcp_reass.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 0639698ffd32..92032cca442f 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1514,8 +1514,9 @@ trimthenstep6:
* RFC 1337.
*/
if (thflags & TH_RST) {
- if (SEQ_GEQ(th->th_seq, tp->last_ack_sent) &&
- SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) {
+ if ((SEQ_GEQ(th->th_seq, tp->last_ack_sent) &&
+ SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) ||
+ (tp->rcv_wnd == 0 && tp->last_ack_sent == th->th_seq)) {
switch (tp->t_state) {
case TCPS_SYN_RECEIVED:
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 0639698ffd32..92032cca442f 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1514,8 +1514,9 @@ trimthenstep6:
* RFC 1337.
*/
if (thflags & TH_RST) {
- if (SEQ_GEQ(th->th_seq, tp->last_ack_sent) &&
- SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) {
+ if ((SEQ_GEQ(th->th_seq, tp->last_ack_sent) &&
+ SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) ||
+ (tp->rcv_wnd == 0 && tp->last_ack_sent == th->th_seq)) {
switch (tp->t_state) {
case TCPS_SYN_RECEIVED: