nettest: Return 1 on MD5 failure for server mode
authorDavid Ahern <dsahern@gmail.com>
Mon, 30 Dec 2019 22:14:30 +0000 (14:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jan 2020 23:51:22 +0000 (15:51 -0800)
On failure to set MD5 password, do_server should return 1 so that the
program exits with 1 rather than 255. This used for negative testing
when adding MD5 with device option.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/nettest.c

index c08f4db8330d0e83cb4f856b399a99508c5068e3..bb6bb1ad11e2273bcb065c769628bb718c717368 100644 (file)
@@ -1194,7 +1194,7 @@ static int do_server(struct sock_args *args)
 
        if (args->password && tcp_md5_remote(lsd, args)) {
                close(lsd);
-               return -1;
+               return 1;
        }
 
        while (1) {