mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
BACKPORT: tcp: add tcp_sock_set_keepidle
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel space without going through a fake uaccess. Change-Id: I57286ea8efb618476bac4d8d74f16e01b17e12aa Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
55cc20722d
commit
259e678a87
4 changed files with 38 additions and 21 deletions
|
|
@ -56,10 +56,7 @@ int rds_tcp_keepalive(struct socket *sock)
|
|||
if (ret < 0)
|
||||
goto bail;
|
||||
|
||||
ret = kernel_setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE,
|
||||
(char *)&keepidle, sizeof(keepidle));
|
||||
if (ret < 0)
|
||||
goto bail;
|
||||
tcp_sock_set_keepidle(sock->sk, keepidle);
|
||||
|
||||
/* KEEPINTVL is the interval between successive probes. We follow
|
||||
* the model in xs_tcp_finish_connecting() and re-use keepidle.
|
||||
|
|
|
|||
Loading…
Reference in a new issue