summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/reuseport_bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/net/reuseport_bpf.c')
-rw-r--r--tools/testing/selftests/net/reuseport_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/reuseport_bpf.c b/tools/testing/selftests/net/reuseport_bpf.c
index b5277106d..b0cc082fb 100644
--- a/tools/testing/selftests/net/reuseport_bpf.c
+++ b/tools/testing/selftests/net/reuseport_bpf.c
@@ -330,7 +330,7 @@ static void test_extra_filter(const struct test_params p)
if (bind(fd1, addr, sockaddr_size()))
error(1, errno, "failed to bind recv socket 1");
- if (!bind(fd2, addr, sockaddr_size()) && errno != EADDRINUSE)
+ if (!bind(fd2, addr, sockaddr_size()) || errno != EADDRINUSE)
error(1, errno, "bind socket 2 should fail with EADDRINUSE");
free(addr);