Skip to content

Commit d8f5df1

Browse files
Mohammad Nassirikuba-moo
authored andcommitted
selftests/net: Argument value mismatch when calling verify_counters()
The end_server() function only operates in the server thread and always takes an accept socket instead of a listen socket as its input argument. To align with this, invert the boolean values used when calling verify_counters() within the end_server() function. As a result of this typo, the test didn't correctly check for the non-symmetrical scenario, where i.e. peer-A uses a key <100:200> to send data, but peer-B uses another key <105:205> to send its data. So, in simple words, different keys for TX and RX. Fixes: 3c3ead5 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Mohammad Nassiri <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ [amended 'Fixes' tag, added the issue description and carried-over to lkml] Signed-off-by: Dmitry Safonov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 585b40e commit d8f5df1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/net/tcp_ao/key-management.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ static void end_server(const char *tst_name, int sk,
843843
synchronize_threads(); /* 4: verified => closed */
844844
close(sk);
845845

846-
verify_counters(tst_name, true, false, begin, &end);
846+
verify_counters(tst_name, false, true, begin, &end);
847847
synchronize_threads(); /* 5: counters */
848848
}
849849

0 commit comments

Comments
 (0)