diff options
author | Eric Dumazet <edumazet@google.com> | 2015-10-14 15:16:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-15 04:06:32 +0200 |
commit | f985c65c908f6b26c30019a83dc5ea295f5fcf62 (patch) | |
tree | f16e00e81bc17fdf6b257b38a85c048d34faf692 /net/ipv4/inet_connection_sock.c | |
parent | tcp/dccp: fix potential NULL deref in __inet_inherit_port() (diff) | |
download | linux-f985c65c908f6b26c30019a83dc5ea295f5fcf62.tar.xz linux-f985c65c908f6b26c30019a83dc5ea295f5fcf62.zip |
tcp: avoid spurious SYN flood detection at listen() time
At listen() time, there is a small window where listener is visible with
a zero backlog, triggering a spurious "Possible SYN flooding on port"
message.
Nothing prevents us from setting the correct backlog.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 514b9e910bd4..ba9ec9a0d0ce 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -727,14 +727,14 @@ void inet_csk_prepare_forced_close(struct sock *sk) } EXPORT_SYMBOL(inet_csk_prepare_forced_close); -int inet_csk_listen_start(struct sock *sk, const int nr_table_entries) +int inet_csk_listen_start(struct sock *sk, int backlog) { struct inet_connection_sock *icsk = inet_csk(sk); struct inet_sock *inet = inet_sk(sk); reqsk_queue_alloc(&icsk->icsk_accept_queue); - sk->sk_max_ack_backlog = 0; + sk->sk_max_ack_backlog = backlog; sk->sk_ack_backlog = 0; inet_csk_delack_init(sk); |