diff mbox series

[08/11] selftests: Make address validation apply only to client mode

Message ID 20210109185358.34616-9-dsahern@kernel.org
State Superseded
Headers show
Series [01/11] selftests: Move device validation in nettest | expand

Commit Message

David Ahern Jan. 9, 2021, 6:53 p.m. UTC
From: David Ahern <dsahern@gmail.com>

When a single instance of nettest is used for client and server
make sure address validation is only done for client mode.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 tools/testing/selftests/net/nettest.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c
index b1d6874d69ee..ff64012ac586 100644
--- a/tools/testing/selftests/net/nettest.c
+++ b/tools/testing/selftests/net/nettest.c
@@ -1718,6 +1718,12 @@  static int ipc_child(int fd, struct sock_args *args)
 
 	server_mode = 1; /* to tell log_msg in case we are in both_mode */
 
+	/* when running in both mode, address validation applies
+	 * solely to client side
+	 */
+	args->has_expected_laddr = 0;
+	args->has_expected_raddr = 0;
+
 	rc = do_server(args, fd);
 
 	free(outbuf);