diff options
author | Willem de Bruijn <willemb@google.com> | 2018-09-09 19:12:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-12 02:34:20 -0400 |
commit | 0297c1c2eadb5bd996a873b87597af3b91c0d4ba (patch) | |
tree | 66398fef2588f20e0fad2083b18465089995bb0a /net/ipv4/tcp_input.c | |
parent | 2d946e5bcdabc1deef72d01bc92a2801c71d6d8d (diff) |
tcp: rate limit synflood warnings further
Convert pr_info to net_info_ratelimited to limit the total number of
synflood warnings.
Commit 946cedccbd73 ("tcp: Change possible SYN flooding messages")
rate limits synflood warnings to one per listener.
Workloads that open many listener sockets can still see a high rate of
log messages. Syzkaller is one frequent example.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4c2dd9f863f7..4cf2f7bb2802 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -6367,8 +6367,8 @@ static bool tcp_syn_flood_action(const struct sock *sk, | |||
6367 | if (!queue->synflood_warned && | 6367 | if (!queue->synflood_warned && |
6368 | net->ipv4.sysctl_tcp_syncookies != 2 && | 6368 | net->ipv4.sysctl_tcp_syncookies != 2 && |
6369 | xchg(&queue->synflood_warned, 1) == 0) | 6369 | xchg(&queue->synflood_warned, 1) == 0) |
6370 | pr_info("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n", | 6370 | net_info_ratelimited("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n", |
6371 | proto, ntohs(tcp_hdr(skb)->dest), msg); | 6371 | proto, ntohs(tcp_hdr(skb)->dest), msg); |
6372 | 6372 | ||
6373 | return want_cookie; | 6373 | return want_cookie; |
6374 | } | 6374 | } |