diff options
author | David Ahern <dsahern@gmail.com> | 2021-01-14 06:09:45 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-15 03:26:49 +0300 |
commit | a824e261d7cd95b0f04a3feff51f8e0fe2881b44 (patch) | |
tree | 47e0d694a7a0003e0f7662d19d92492687224d19 /tools/testing/selftests/net/nettest.c | |
parent | 9a8d584964fc808080a855b435507fe5094f2160 (diff) | |
download | linux-a824e261d7cd95b0f04a3feff51f8e0fe2881b44.tar.xz |
selftests: Consistently specify address for MD5 protection
nettest started with -r as the remote address for MD5 passwords.
The -m argument was added to use prefixes with a length when that
feature was added to the kernel. Since -r is used to specify
remote address for client mode, change nettest to only use -m
for MD5 passwords and update fcnal-test script.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/nettest.c')
-rw-r--r-- | tools/testing/selftests/net/nettest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c index 0e01a7447521..4c8d4570872d 100644 --- a/tools/testing/selftests/net/nettest.c +++ b/tools/testing/selftests/net/nettest.c @@ -291,13 +291,13 @@ static int tcp_md5_remote(int sd, struct sock_args *args) switch (args->version) { case AF_INET: sin.sin_port = htons(args->port); - sin.sin_addr = args->remote_addr.in; + sin.sin_addr = args->md5_prefix.v4.sin_addr; addr = &sin; alen = sizeof(sin); break; case AF_INET6: sin6.sin6_port = htons(args->port); - sin6.sin6_addr = args->remote_addr.in6; + sin6.sin6_addr = args->md5_prefix.v6.sin6_addr; addr = &sin6; alen = sizeof(sin6); break; @@ -725,7 +725,7 @@ static int convert_addr(struct sock_args *args, const char *_str, return 1; } } else { - args->prefix_len = pfx_len_max; + args->prefix_len = 0; } break; default: |