aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorUrsula Braun <[email protected]>2017-01-09 15:55:12 +0000
committerDavid S. Miller <[email protected]>2017-01-09 21:07:37 +0000
commit4b9d07a44015a0e940448fa3885b894349e8b162 (patch)
treec812e6e8a8415b77dbd190e4609d40a1b307e243 /net/ipv6/tcp_ipv6.c
parentMerge branch 'sh_eth-wol' (diff)
downloadkernel-4b9d07a44015a0e940448fa3885b894349e8b162.tar.gz
kernel-4b9d07a44015a0e940448fa3885b894349e8b162.zip
net: introduce keepalive function in struct proto
Direct call of tcp_set_keepalive() function from protocol-agnostic sock_setsockopt() function in net/core/sock.c violates network layering. And newly introduced protocol (SMC-R) will need its own keepalive function. Therefore, add "keepalive" function pointer to "struct proto", and call it from sock_setsockopt() via this pointer. Signed-off-by: Ursula Braun <[email protected]> Reviewed-by: Utz Bacher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index a4cdf6a34c30..228965dca3c5 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1889,6 +1889,7 @@ struct proto tcpv6_prot = {
.shutdown = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
+ .keepalive = tcp_set_keepalive,
.recvmsg = tcp_recvmsg,
.sendmsg = tcp_sendmsg,
.sendpage = tcp_sendpage,