tcp: fastopen: limit max_qlen
authorEric Dumazet <edumazet@google.com>
Tue, 20 Oct 2015 20:17:40 +0000 (13:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 13:22:13 +0000 (06:22 -0700)
commitdbf650b67bb4db1b95807d2aafe2d7cfafd458da
tree1fa9fdca8c6f9380fd711cf2aa77fd48483ecd6e
parente2aacd963a06fc558a809ecb62f5833e6c340b28
tcp: fastopen: limit max_qlen

Allowing an application to set whatever limit for
the list of recently RST fastopen sessions [1] is not wise,
as it open ways to deplete kernel memory.

Cap the user provided limit by somaxconn sysctl,
like listen() backlog.

[1] https://tools.ietf.org/html/rfc7413#section-5.1

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h