Missing use of TcpPassiveOpens counter?

Johan Adolfsson (johan.adolfsson@axis.com)
Mon, 12 Mar 2001 13:36:45 +0100


While trying to track down a possible select()/accept()
problem in 2.0.38 I noticed that theTcpPassiveOpens counter
is never increased (not in 2.0, 2.2 nor 2.4)

When checking more of the Tcp: fields in
/proc/net/snmp
it looks like some more fields are not set correctly
(tcpRto*, tcpMaxConn )

Just overlooked and forgotten or does nobody care?
(or both:)

The following patch for 2.0 increases the TcpPassiveOpen counter,
the case where you have crossed SYN's is not handled,
but I don't think it should anyway?
At first I was tempted to put it in the tcp_accept() function,
but it should really be when we change state from
LISTEN to SYN_RECVD.

diff -u -p -r1.7 tcp_input.c
--- tcp_input.c 2000/03/30 15:53:22 1.7
+++ tcp_input.c 2001/03/12 12:11:18
@@ -747,7 +747,9 @@ static void tcp_conn_request(struct sock
newsk->dummy_th.source = skb->h.th->dest;
newsk->dummy_th.dest = skb->h.th->source;
newsk->users=0;
-
+
+ tcp_statistics.TcpPassiveOpens++; /* LISTEN to SYN_RECV */
+
#ifdef CONFIG_IP_TRANSPARENT_PROXY
/*
* Deal with possibly redirected traffic by setting num to

In 2.4 I'm not sure where to put the
TCP_INC_STATS(TcpPassiveOpens); or
TCP_INC_STATS_BH(TcpPassiveOpens);

tcp_minisocks.c:tcp_create_openreq_child() ?

/Johan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/