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
@@ -25,10 +25,6 @@
|
||||
#define TLS_PAYLOAD_MAX_LEN 16384
|
||||
#define SOL_TLS 282
|
||||
|
||||
#ifndef ENOTSUPP
|
||||
#define ENOTSUPP 524
|
||||
#endif
|
||||
|
||||
FIXTURE(tls_basic)
|
||||
{
|
||||
int fd, cfd;
|
||||
@@ -1205,11 +1201,11 @@ TEST(non_established) {
|
||||
/* TLS ULP not supported */
|
||||
if (errno == ENOENT)
|
||||
return;
|
||||
EXPECT_EQ(errno, ENOTSUPP);
|
||||
EXPECT_EQ(errno, ENOTCONN);
|
||||
|
||||
ret = setsockopt(sfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls"));
|
||||
EXPECT_EQ(ret, -1);
|
||||
EXPECT_EQ(errno, ENOTSUPP);
|
||||
EXPECT_EQ(errno, ENOTCONN);
|
||||
|
||||
ret = getsockname(sfd, &addr, &len);
|
||||
ASSERT_EQ(ret, 0);
|
||||
|
Reference in New Issue
Block a user