mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
|
|
@ -2256,8 +2256,7 @@ static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt,
|
|||
/* TCP Keepalive options */
|
||||
kernel_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
|
||||
(char *)&opt_on, sizeof(opt_on));
|
||||
kernel_setsockopt(sock, SOL_TCP, TCP_KEEPIDLE,
|
||||
(char *)&keepidle, sizeof(keepidle));
|
||||
tcp_sock_set_keepidle(sock->sk, keepidle);
|
||||
kernel_setsockopt(sock, SOL_TCP, TCP_KEEPINTVL,
|
||||
(char *)&keepidle, sizeof(keepidle));
|
||||
kernel_setsockopt(sock, SOL_TCP, TCP_KEEPCNT,
|
||||
|
|
|
|||
Loading…
Reference in a new issue