diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 9aac9c60d786..057c1af6182a 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -790,6 +790,9 @@ static void tls_update(struct sock *sk, struct proto *p, { struct tls_context *ctx; + if (sk->sk_prot == p) + return; + ctx = tls_get_ctx(sk); if (likely(ctx)) { ctx->sk_write_space = write_space;