diff options
author | Valentin Vidic <vvidic@valentin-vidic.from.hr> | 2019-12-05 07:41:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-06 20:15:39 -0800 |
commit | 4a5cdc604b9cf645e6fa24d8d9f055955c3c8516 (patch) | |
tree | fbf990cba5f852a84307f6cbbba7a4c08e344a5b /net/tls/tls_device.c | |
parent | 1af66221a66de080274540a5c481ddacbe3574d2 (diff) | |
download | linux-stable-4a5cdc604b9cf645e6fa24d8d9f055955c3c8516.tar.gz linux-stable-4a5cdc604b9cf645e6fa24d8d9f055955c3c8516.tar.bz2 linux-stable-4a5cdc604b9cf645e6fa24d8d9f055955c3c8516.zip |
net/tls: Fix return values to avoid ENOTSUPP
ENOTSUPP is not available in userspace, for example:
setsockopt failed, 524, Unknown error 524
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r-- | net/tls/tls_device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 0683788bbef0..cd91ad812291 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -429,7 +429,7 @@ static int tls_push_data(struct sock *sk, if (flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST)) - return -ENOTSUPP; + return -EOPNOTSUPP; if (unlikely(sk->sk_err)) return -sk->sk_err; @@ -571,7 +571,7 @@ int tls_device_sendpage(struct sock *sk, struct page *page, lock_sock(sk); if (flags & MSG_OOB) { - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; goto out; } @@ -1023,7 +1023,7 @@ int tls_set_device_offload(struct sock *sk, struct tls_context *ctx) } if (!(netdev->features & NETIF_F_HW_TLS_TX)) { - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; goto release_netdev; } @@ -1098,7 +1098,7 @@ int tls_set_device_offload_rx(struct sock *sk, struct tls_context *ctx) } if (!(netdev->features & NETIF_F_HW_TLS_RX)) { - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; goto release_netdev; } |