summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/tcp_input.c14
-rw-r--r--sys/netinet/tcp_reass.c14
2 files changed, 8 insertions, 20 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 24740ef..e9cb3c8 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.69 1998/01/27 09:15:08 davidg Exp $
+ * $Id: tcp_input.c,v 1.70 1998/02/26 05:25:28 dg Exp $
*/
#include "opt_tcpdebug.h"
@@ -736,19 +736,13 @@ findpcb:
/*
* If the state is SYN_RECEIVED:
- * if seg contains SYN/ACK, send a RST.
* if seg contains an ACK, but not for our SYN/ACK, send a RST.
*/
case TCPS_SYN_RECEIVED:
- if (tiflags & TH_ACK) {
- if (tiflags & TH_SYN) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))
+ if ((tiflags & TH_ACK) &&
+ (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
+ SEQ_GT(ti->ti_ack, tp->snd_max)))
goto dropwithreset;
- }
break;
/*
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 24740ef..e9cb3c8 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.69 1998/01/27 09:15:08 davidg Exp $
+ * $Id: tcp_input.c,v 1.70 1998/02/26 05:25:28 dg Exp $
*/
#include "opt_tcpdebug.h"
@@ -736,19 +736,13 @@ findpcb:
/*
* If the state is SYN_RECEIVED:
- * if seg contains SYN/ACK, send a RST.
* if seg contains an ACK, but not for our SYN/ACK, send a RST.
*/
case TCPS_SYN_RECEIVED:
- if (tiflags & TH_ACK) {
- if (tiflags & TH_SYN) {
- tcpstat.tcps_badsyn++;
- goto dropwithreset;
- }
- if (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
- SEQ_GT(ti->ti_ack, tp->snd_max))
+ if ((tiflags & TH_ACK) &&
+ (SEQ_LEQ(ti->ti_ack, tp->snd_una) ||
+ SEQ_GT(ti->ti_ack, tp->snd_max)))
goto dropwithreset;
- }
break;
/*
OpenPOWER on IntegriCloud