Module Name:    src
Committed By:   christos
Date:           Sat Jun 20 17:29:31 UTC 2009

Modified Files:
        src/sys/netinet: tcp_input.c

Log Message:
Follow exactly the recommendation of draft-ietf-tcpm-tcpsecure-11.txt:
Don't check gainst the last ack received, but the expected sequence number.
This makes RST handling independent of delayed ACK. From Joanne M Mikkelson.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/netinet/tcp_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.295 src/sys/netinet/tcp_input.c:1.296
--- src/sys/netinet/tcp_input.c:1.295	Wed Mar 18 12:00:22 2009
+++ src/sys/netinet/tcp_input.c	Sat Jun 20 13:29:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.295 2009/03/18 16:00:22 cegger Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.296 2009/06/20 17:29:31 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.295 2009/03/18 16:00:22 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.296 2009/06/20 17:29:31 christos Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -2104,7 +2104,7 @@
 			tcps[TCP_STAT_RCVDUPBYTE] += todrop;
 			TCP_STAT_PUTREF();
 		} else if ((tiflags & TH_RST) &&
-			   th->th_seq != tp->last_ack_sent) {
+			   th->th_seq != tp->rcv_nxt) {
 			/*
 			 * Test for reset before adjusting the sequence
 			 * number for overlapping data.
@@ -2230,7 +2230,7 @@
 	 *	Close the tcb.
 	 */
 	if (tiflags & TH_RST) {
-		if (th->th_seq != tp->last_ack_sent)
+		if (th->th_seq != tp->rcv_nxt)
 			goto dropafterack_ratelim;
 
 		switch (tp->t_state) {

Reply via email to