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-07 05:15:39 +0100 |
commit | 4a5cdc604b9cf645e6fa24d8d9f055955c3c8516 (patch) | |
tree | fbf990cba5f852a84307f6cbbba7a4c08e344a5b /tools | |
parent | net: avoid an indirect call in ____sys_recvmsg() (diff) | |
download | linux-4a5cdc604b9cf645e6fa24d8d9f055955c3c8516.tar.xz linux-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 'tools')
-rw-r--r-- | tools/testing/selftests/net/tls.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 46abcae47dee..13e5ef615026 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -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); |