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 <ubraun@linux.vnet.ibm.com> Reviewed-by: Utz Bacher <utz.bacher@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c8584b3fdf
commit
4b9d07a440
@@ -617,6 +617,7 @@ void tcp_set_keepalive(struct sock *sk, int val)
|
||||
else if (!val)
|
||||
inet_csk_delete_keepalive_timer(sk);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tcp_set_keepalive);
|
||||
|
||||
|
||||
static void tcp_keepalive_timer (unsigned long data)
|
||||
|
Reference in New Issue
Block a user