summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2007-04-20 14:34:54 +0000
committerandre <andre@FreeBSD.org>2007-04-20 14:34:54 +0000
commitedec8cf92bff97762899e3f08bf27d67c2a8a148 (patch)
treed50ed633523d6e403506f6bc0e65d631b328c6cf /sys/netinet/tcp_input.c
parent707a7006195c6c0989100a57e7cc70ded2ac57ff (diff)
downloadFreeBSD-src-edec8cf92bff97762899e3f08bf27d67c2a8a148.zip
FreeBSD-src-edec8cf92bff97762899e3f08bf27d67c2a8a148.tar.gz
Remove bogus check for accept queue length and associated failure handling
from the incoming SYN handling section of tcp_input(). Enforcement of the accept queue limits is done by sonewconn() after the 3WHS is completed. It is not necessary to have an earlier check before a connection request enters the SYN cache awaiting the full handshake. It rather limits the effectiveness of the syncache by preventing legit and illegit connections from entering it and having them shaken out before we hit the real limit which may have vanished by then. Change return value of syncache_add() to void. No status communication is required.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index bf8df6a..62ccb3b 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -966,24 +966,18 @@ findpcb:
* SYN appears to be valid. Create compressed TCP state
* for syncache.
*/
- if (so->so_qlen <= so->so_qlimit) {
#ifdef TCPDEBUG
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_INPUT, ostate, tp,
- (void *)tcp_saveipgen, &tcp_savetcp, 0);
+ if (so->so_options & SO_DEBUG)
+ tcp_trace(TA_INPUT, ostate, tp,
+ (void *)tcp_saveipgen, &tcp_savetcp, 0);
#endif
- tcp_dooptions(&to, optp, optlen, TO_SYN);
- if (!syncache_add(&inc, &to, th, inp, &so, m))
- goto dropunlock;
- /*
- * Entry added to syncache, mbuf used to
- * send SYN-ACK packet. Everything unlocked
- * already.
- */
- return;
- }
- /* Catch all. Everthing that makes it down here is junk. */
- goto dropunlock;
+ tcp_dooptions(&to, optp, optlen, TO_SYN);
+ syncache_add(&inc, &to, th, inp, &so, m);
+ /*
+ * Entry added to syncache and mbuf consumed.
+ * Everything unlocked already by syncache_add().
+ */
+ return;
}
/*
OpenPOWER on IntegriCloud