summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1998-01-27 09:15:13 +0000
committerDavid Greenman <dg@FreeBSD.org>1998-01-27 09:15:13 +0000
commitc3229e05a368643ab2e7e7c210b40586d041ba04 (patch)
tree6e590a83ef8e255ffe4974380799f25266f0e781 /sys/netinet/tcp_subr.c
parent5be975adf0385ccfc40821e603dcd5169a4dd1d4 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 962dc474445f..b0bdac21cbf2 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
- * $Id: tcp_subr.c,v 1.40 1997/12/19 03:36:14 julian Exp $
+ * $Id: tcp_subr.c,v 1.41 1998/01/25 04:23:32 eivind Exp $
*/
#include "opt_compat.h"
@@ -87,11 +87,10 @@ static void tcp_cleartaocache __P((void));
static void tcp_notify __P((struct inpcb *, int));
/*
- * Target size of TCP PCB hash table. Will be rounded down to a prime
- * number.
+ * Target size of TCP PCB hash tables. Must be a power of two.
*/
#ifndef TCBHASHSIZE
-#define TCBHASHSIZE 128
+#define TCBHASHSIZE 512
#endif
/*
@@ -107,6 +106,7 @@ tcp_init()
LIST_INIT(&tcb);
tcbinfo.listhead = &tcb;
tcbinfo.hashbase = hashinit(TCBHASHSIZE, M_PCB, &tcbinfo.hashmask);
+ tcbinfo.porthashbase = hashinit(TCBHASHSIZE, M_PCB, &tcbinfo.porthashmask);
if (max_protohdr < sizeof(struct tcpiphdr))
max_protohdr = sizeof(struct tcpiphdr);
if (max_linkhdr + sizeof(struct tcpiphdr) > MHLEN)
@@ -417,8 +417,8 @@ tcp_close(tp)
}
if (tp->t_template)
(void) m_free(dtom(tp->t_template));
+ inp->inp_ppcb = NULL;
free(tp, M_PCB);
- inp->inp_ppcb = 0;
soisdisconnected(so);
in_pcbdetach(inp);
tcpstat.tcps_closed++;