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>
This commit is contained in:

committed by
David S. Miller

parent
1af66221a6
commit
4a5cdc604b
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user