diff options
author | Dave Watson <davejwatson@fb.com> | 2018-03-22 20:10:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-23 19:25:54 +0300 |
commit | f4a8e43f1f0abc0e93ed5ee132288ee4142afde1 (patch) | |
tree | 8dcb9a6a772faf599d2445ce1d36bea6a06cc130 /net/tls/tls_sw.c | |
parent | dbe425599ba05c7415f632e6f5f018453098eb69 (diff) | |
download | linux-f4a8e43f1f0abc0e93ed5ee132288ee4142afde1.tar.xz |
tls: Pass error code explicitly to tls_err_abort
Pass EBADMSG explicitly to tls_err_abort. Receive path will
pass additional codes - EMSGSIZE if framing is larger than max
TLS record size, EINVAL if TLS version mismatch.
Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_sw.c')
-rw-r--r-- | net/tls/tls_sw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 338d743bcc21..1c79d9ad1731 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -214,7 +214,7 @@ static int tls_push_record(struct sock *sk, int flags, /* Only pass through MSG_DONTWAIT and MSG_NOSIGNAL flags */ rc = tls_push_sg(sk, tls_ctx, ctx->sg_encrypted_data, 0, flags); if (rc < 0 && rc != -EAGAIN) - tls_err_abort(sk); + tls_err_abort(sk, EBADMSG); tls_advance_record_sn(sk, &tls_ctx->tx); return rc; |