linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Missing use of TcpPassiveOpens counter?
@ 2001-03-12 12:36 Johan Adolfsson
  0 siblings, 0 replies; only message in thread
From: Johan Adolfsson @ 2001-03-12 12:36 UTC (permalink / raw)
  To: linux-kernel

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-12 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-12 12:36 Missing use of TcpPassiveOpens counter? Johan Adolfsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).