From 39172c9401612f4c05354868790f229a8534c23e Mon Sep 17 00:00:00 2001 From: Bill Fenner Date: Sun, 10 Nov 1996 07:37:24 +0000 Subject: [PATCH] Re-enable the TCP SYN-attack protection code. I was the one who didn't understand the socket state flag. 2.2 candidate. --- sys/netinet/tcp_input.c | 4 +--- sys/netinet/tcp_reass.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 657fef8b0488..d481fbdd6f7b 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.53 1996/10/07 19:06:10 davidg Exp $ + * $Id: tcp_input.c,v 1.54 1996/10/11 19:26:42 pst Exp $ */ #ifndef TUBA_INCLUDE @@ -415,14 +415,12 @@ tcp_input(m, iphlen) so2 = sonewconn(so, 0); if (so2 == 0) { tcpstat.tcps_listendrop++; -#ifdef TCPSYNRED so2 = sodropablereq(so); if (so2) { tcp_drop(sototcpcb(so2), ETIMEDOUT); so2 = sonewconn(so, 0); } if (!so2) -#endif goto drop; } so = so2; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 657fef8b0488..d481fbdd6f7b 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.53 1996/10/07 19:06:10 davidg Exp $ + * $Id: tcp_input.c,v 1.54 1996/10/11 19:26:42 pst Exp $ */ #ifndef TUBA_INCLUDE @@ -415,14 +415,12 @@ tcp_input(m, iphlen) so2 = sonewconn(so, 0); if (so2 == 0) { tcpstat.tcps_listendrop++; -#ifdef TCPSYNRED so2 = sodropablereq(so); if (so2) { tcp_drop(sototcpcb(so2), ETIMEDOUT); so2 = sonewconn(so, 0); } if (!so2) -#endif goto drop; } so = so2;