aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp/token_test.c
Commit message (Collapse)AuthorAgeFilesLines
* mptcp: token kunit: set protocolMatthieu Baerts (NGI0)2024-02-271-1/+6
| | | | | | | | | | | | | As it would be done when initiating an MPTCP sock. This is not strictly needed for this test, but it will be when a later patch will check if the right protocol is being used when calling mptcp_sk(). Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://lore.kernel.org/r/20240223-upstream-net-next-20240223-misc-improvements-v1-2-b6c8a10396bd@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
* mptcp: fill in missing MODULE_DESCRIPTION()Matthieu Baerts2023-12-171-0/+1
| | | | | | | | | | W=1 builds warn on missing MODULE_DESCRIPTION, add them here in MPTCP. Only two were missing: two modules with different KUnit tests for MPTCP. Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: David S. Miller <[email protected]>
* mptcp: init sk->sk_prot in build_msk()Menglong Dong2023-01-091-0/+3
| | | | | | | | | | The 'sk_prot' field in token KUNIT self-tests will be dereferenced in mptcp_token_new_connect(). Therefore, init it with tcp_prot. Acked-by: Paolo Abeni <[email protected]> Signed-off-by: Menglong Dong <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
* mptcp: don't return sockets in foreign netnsFlorian Westphal2021-09-241-6/+8
| | | | | | | | | | | | | | | | mptcp_token_get_sock() may return a mptcp socket that is in a different net namespace than the socket that received the token value. The mptcp syncookie code path had an explicit check for this, this moves the test into mptcp_token_get_sock() function. Eventually token.c should be converted to pernet storage, but such change is not suitable for net tree. Fixes: 2c5ebd001d4f0 ("mptcp: refactor token container") Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
* mptcp: introduce token KUNIT self-testsPaolo Abeni2020-06-261-0/+140
Unit tests for the internal MPTCP token APIs, using KUNIT v1 -> v2: - use the correct RCU annotation when initializing icsk ulp - fix a few checkpatch issues Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>