From: roy.qing.li@gmail.com
To: netdev@vger.kernel.org
Cc: joe@perches.com
Subject: [PATCH][net-next] tcp: remove the duplicate prefixes in the logging message
Date: Mon, 21 Apr 2014 21:17:57 +0800 [thread overview]
Message-ID: <1398086277-27943-1-git-send-email-roy.qing.li@gmail.com> (raw)
From: Li RongQing <roy.qing.li@gmail.com>
The current message is:
TCP: TCP: Possible SYN flooding on port 80. Sending cookies. ...
The cause is that pr_info will implicitly print the pr_fmt string, which is standard
prefix, and explicitly print the "proto" which is "TCP:" too
it is unsuitable to not print proto, since proto maybe TCPv6, so use printk directly.
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
net/ipv4/tcp_ipv4.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 6379894..370fa46 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -892,8 +892,8 @@ bool tcp_syn_flood_action(struct sock *sk,
lopt = inet_csk(sk)->icsk_accept_queue.listen_opt;
if (!lopt->synflood_warned && sysctl_tcp_syncookies != 2) {
lopt->synflood_warned = 1;
- pr_info("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n",
- proto, ntohs(tcp_hdr(skb)->dest), msg);
+ printk(KERN_INFO "%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n"
+ proto, ntohs(tcp_hdr(skb)->dest), msg);
}
return want_cookie;
}
--
1.7.10.4
next reply other threads:[~2014-04-21 13:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 13:17 roy.qing.li [this message]
2014-04-22 0:04 ` [PATCH][net-next] tcp: remove the duplicate prefixes in the logging message Li RongQing
-- strict thread matches above, loose matches on Subject: below --
2014-04-23 9:28 roy.qing.li
2014-04-23 9:35 ` Daniel Borkmann
2014-04-23 13:32 ` Li RongQing
2014-04-24 17:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398086277-27943-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).