diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1c0825174c47..b5cc0bb396ef 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.35 1996/01/31 08:22:24 olah Exp $ + * $Id: tcp_input.c,v 1.36 1996/02/22 11:46:39 davidg Exp $ */ #ifndef TUBA_INCLUDE @@ -396,8 +396,10 @@ findpcb: if (so->so_options & SO_ACCEPTCONN) { register struct tcpcb *tp0 = tp; so = sonewconn(so, 0); - if (so == 0) + if (so == 0) { + tcpstat.tcps_listendrop++; goto drop; + } /* * This is ugly, but .... * diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 1c0825174c47..b5cc0bb396ef 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.35 1996/01/31 08:22:24 olah Exp $ + * $Id: tcp_input.c,v 1.36 1996/02/22 11:46:39 davidg Exp $ */ #ifndef TUBA_INCLUDE @@ -396,8 +396,10 @@ findpcb: if (so->so_options & SO_ACCEPTCONN) { register struct tcpcb *tp0 = tp; so = sonewconn(so, 0); - if (so == 0) + if (so == 0) { + tcpstat.tcps_listendrop++; goto drop; + } /* * This is ugly, but .... * diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index d1d77061cbbb..4ff76592f276 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 - * $Id: tcp_var.h,v 1.27 1996/01/19 08:02:34 peter Exp $ + * $Id: tcp_var.h,v 1.28 1996/01/30 22:58:33 mpp Exp $ */ #ifndef _NETINET_TCP_VAR_H_ @@ -289,6 +289,7 @@ struct tcpstat { u_long tcps_persistdrop; /* timeout in persist state */ u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */ u_long tcps_mturesent; /* resends due to MTU discovery */ + u_long tcps_listendrops; /* listen queue overflows */ }; /* diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 8f1fd9590959..11ac1ce7ba9d 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -218,6 +218,7 @@ tcp_stats(off, name) p(tcps_connattempt, "\t%d connection request%s\n"); p(tcps_accepts, "\t%d connection accept%s\n"); p(tcps_badsyn, "\t%d bad connection attempt%s\n"); + p(tcps_listendrop, "\t%d listen queue overflow%s\n"); p(tcps_connects, "\t%d connection%s established (including accepts)\n"); p2(tcps_closed, tcps_drops, "\t%d connection%s closed (including %d drop%s)\n");