]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/tls/tls_main.c
Merge tag 'mlx5-fixes-2019-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / net / tls / tls_main.c
index b3da6c5ab999b844b50fb98fc9c7f39173b89b2d..dac24c7aa7d4bb45b3188dae3fb1f6030cd3c299 100644 (file)
@@ -487,7 +487,7 @@ static int do_tls_setsockopt_conf(struct sock *sk, char __user *optval,
        /* check version */
        if (crypto_info->version != TLS_1_2_VERSION &&
            crypto_info->version != TLS_1_3_VERSION) {
-               rc = -ENOTSUPP;
+               rc = -EINVAL;
                goto err_crypto_info;
        }
 
@@ -714,7 +714,7 @@ static int tls_init(struct sock *sk)
         * share the ulp context.
         */
        if (sk->sk_state != TCP_ESTABLISHED)
-               return -ENOTSUPP;
+               return -ENOTCONN;
 
        /* allocate tls context */
        write_lock_bh(&sk->sk_callback_lock);