diff options
author | Valentin Vidic <vvidic@valentin-vidic.from.hr> | 2019-12-05 07:41:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-18 16:05:45 +0100 |
commit | 284504c24e88e6c7cb94eec10aa18ea187d2aa51 (patch) | |
tree | d63e7b265a3f120a432073c2357249ac9070cb4f /tools/testing | |
parent | 01e73a8cc49c8d818b56c4a9fd43910a47820a39 (diff) | |
download | linux-stable-284504c24e88e6c7cb94eec10aa18ea187d2aa51.tar.gz linux-stable-284504c24e88e6c7cb94eec10aa18ea187d2aa51.tar.bz2 linux-stable-284504c24e88e6c7cb94eec10aa18ea187d2aa51.zip |
net/tls: Fix return values to avoid ENOTSUPP
[ Upstream commit 4a5cdc604b9cf645e6fa24d8d9f055955c3c8516 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-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); |