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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5357897D.8060809@redhat.com>
Date:	Wed, 23 Apr 2014 11:35:57 +0200
From:	Daniel Borkmann <dborkman@...hat.com>
To:	roy.qing.li@...il.com
CC:	netdev@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH][net-next] tcp: remove the duplicate prefixes in the logging
 message

On 04/23/2014 11:28 AM, roy.qing.li@...il.com wrote:
> From: Li RongQing <roy.qing.li@...il.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.

Can't you just leave the pr_info() instead, and reword that into something like:

   "Possible %s SYN flooding[...]", proto

> Cc: Joe Perches <joe@...ches.com>
> Signed-off-by: Li RongQing <roy.qing.li@...il.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 438f3b9..85ebe68 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;
>   }
>
--
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