aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ulp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ulp.c')
-rw-r--r--net/ipv4/tcp_ulp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c
index 3d8a1d835471..4849edb62d52 100644
--- a/net/ipv4/tcp_ulp.c
+++ b/net/ipv4/tcp_ulp.c
@@ -96,6 +96,19 @@ void tcp_get_available_ulp(char *buf, size_t maxlen)
96 rcu_read_unlock(); 96 rcu_read_unlock();
97} 97}
98 98
99void tcp_update_ulp(struct sock *sk, struct proto *proto)
100{
101 struct inet_connection_sock *icsk = inet_csk(sk);
102
103 if (!icsk->icsk_ulp_ops) {
104 sk->sk_prot = proto;
105 return;
106 }
107
108 if (icsk->icsk_ulp_ops->update)
109 icsk->icsk_ulp_ops->update(sk, proto);
110}
111
99void tcp_cleanup_ulp(struct sock *sk) 112void tcp_cleanup_ulp(struct sock *sk)
100{ 113{
101 struct inet_connection_sock *icsk = inet_csk(sk); 114 struct inet_connection_sock *icsk = inet_csk(sk);