lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1262808658-29346-1-git-send-email-opurdila@ixiacom.com>
Date:	Wed,  6 Jan 2010 22:10:58 +0200
From:	Octavian Purdila <opurdila@...acom.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, Octavian Purdila <opurdila@...acom.com>,
	Maksim Pyatkovskiy <mpyatkovskiy@...acom.com>
Subject: [PATCH] tcp: account SYN-ACK timeouts & retransmissions

Signed-off-by: Maksim Pyatkovskiy <mpyatkovskiy@...acom.com>
Signed-off-by: Octavian Purdila <opurdila@...acom.com>
---
 net/ipv4/inet_connection_sock.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index ee16475..6c20043 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -23,6 +23,7 @@
 #include <net/route.h>
 #include <net/tcp_states.h>
 #include <net/xfrm.h>
+#include <net/tcp.h>
 
 #ifdef INET_CSK_DEBUG
 const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n";
@@ -525,7 +526,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
 		while ((req = *reqp) != NULL) {
 			if (time_after_eq(now, req->expires)) {
 				int expire = 0, resend = 0;
+				struct net *net = sock_net(parent);
 
+				NET_INC_STATS_BH(net, LINUX_MIB_TCPTIMEOUTS);
 				syn_ack_recalc(req, thresh, max_retries,
 					       queue->rskq_defer_accept,
 					       &expire, &resend);
@@ -535,6 +538,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
 				     inet_rsk(req)->acked)) {
 					unsigned long timeo;
 
+					TCP_INC_STATS_BH(net, TCP_MIB_RETRANSSEGS);
 					if (req->retrans++ == 0)
 						lopt->qlen_young--;
 					timeo = min((timeout << req->retrans), max_rto);
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ