]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: md5: use sock_kmalloc() to limit md5 keys
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 31 Jan 2012 10:56:48 +0000 (10:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Jan 2012 21:11:48 +0000 (16:11 -0500)
commitfff6ce1bef524a8c422eedc78f260834ea8297d0
tree7847eb10ad6a754ed2798bce28ea3d142484a164
parent5ae087d3a70913d4510ec42a99bec2c82bb9ed97
tcp: md5: use sock_kmalloc() to limit md5 keys

There is no limit on number of MD5 keys an application can attach to a
tcp socket.

This patch adds a per tcp socket limit based
on /proc/sys/net/core/optmem_max

With current default optmem_max values, this allows about 150 keys on
64bit arches, and 88 keys on 32bit arches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c