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: <1318883125-29500-1-git-send-email-dpmcgee@gmail.com>
Date:	Mon, 17 Oct 2011 15:25:24 -0500
From:	Dan McGee <dpmcgee@...il.com>
To:	netdev@...r.kernel.org
Cc:	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>, linux-kernel@...r.kernel.org
Subject: [PATCH] Disable TCP_DEBUG and FASTRETRANS_DEBUG by default

If these are truly debug options, they should be turned off by default
and can be tweaked if necessary. Fix one usage of the flag to use #if
instead of #ifdef so defining to zero is acceptable.

Signed-off-by: Dan McGee <dpmcgee@...il.com>
---
 include/net/tcp.h    |    4 ++--
 net/ipv4/tcp_timer.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index acc620a..15236d0 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -18,8 +18,8 @@
 #ifndef _TCP_H
 #define _TCP_H
 
-#define TCP_DEBUG 1
-#define FASTRETRANS_DEBUG 1
+#define TCP_DEBUG 0
+#define FASTRETRANS_DEBUG 0
 
 #include <linux/list.h>
 #include <linux/tcp.h>
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index ecd44b0..31669e7 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -334,7 +334,7 @@ void tcp_retransmit_timer(struct sock *sk)
 		 * connection. If the socket is an orphan, time it out,
 		 * we cannot allow such beasts to hang infinitely.
 		 */
-#ifdef TCP_DEBUG
+#if TCP_DEBUG
 		struct inet_sock *inet = inet_sk(sk);
 		if (sk->sk_family == AF_INET) {
 			LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
-- 
1.7.7

--
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