summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/tcp_ao/bench-lookups.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/net/tcp_ao/bench-lookups.c')
-rw-r--r--tools/testing/selftests/net/tcp_ao/bench-lookups.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tcp_ao/bench-lookups.c b/tools/testing/selftests/net/tcp_ao/bench-lookups.c
index 7be8a7d9308c..a1e6e007c291 100644
--- a/tools/testing/selftests/net/tcp_ao/bench-lookups.c
+++ b/tools/testing/selftests/net/tcp_ao/bench-lookups.c
@@ -46,8 +46,10 @@ static void test_add_routes(union tcp_addr *ips, size_t ips_nr)
for (i = 0; i < ips_nr; i++) {
union tcp_addr *p = (union tcp_addr *)&ips[i];
+ int err;
- if (ip_route_add(veth_name, TEST_FAMILY, this_ip_addr, *p))
+ err = ip_route_add(veth_name, TEST_FAMILY, this_ip_addr, *p);
+ if (err && err != -EEXIST)
test_error("Failed to add route");
}
}