Commit Graph

5 Commits

Author SHA1 Message Date
Nico Pache 5a87d1e9cb mptcp: fill in missing MODULE_DESCRIPTION()
commit a8f570b247972775f710375125ebabfc47b1e518
Author: Matthieu Baerts <matttbe@kernel.org>
Date:   Fri Dec 15 17:04:26 2023 +0100

    mptcp: fill in missing MODULE_DESCRIPTION()

    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 <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

JIRA: https://issues.redhat.com/browse/RHEL-39303
Signed-off-by: Nico Pache <npache@redhat.com>
2024-07-31 20:32:27 -06:00
Paolo Abeni b15b1c37a7 mptcp: token kunit: set protocol
JIRA: https://issues.redhat.com/browse/RHEL-28492
Tested: LNST, Tier1

Upstream commit:
commit 28de50eeb734bbdbc1c4397134fa3501d3490a62
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Fri Feb 23 21:17:54 2024 +0100

    mptcp: token kunit: set protocol

    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 <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-next-20240223-misc-improvements-v1-2-b6c8a10396bd@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-05-10 17:13:30 +02:00
Davide Caratti 2333c85148 mptcp: init sk->sk_prot in build_msk()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2193330
Upstream Status: net.git commit ade4d754620f

commit ade4d754620f6d605705bf337aedef115158697e
Author: Menglong Dong <imagedong@tencent.com>
Date:   Fri Jan 6 10:57:21 2023 -0800

    mptcp: init sk->sk_prot in build_msk()

    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 <pabeni@redhat.com>
    Signed-off-by: Menglong Dong <imagedong@tencent.com>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2023-05-11 11:46:46 +02:00
Paolo Abeni b4b248ecec mptcp: don't return sockets in foreign netns
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2028420
Tested: LNST, Tier1

Upstream commit:
commit ea1300b9df7c8e8b65695a08b8f6aaf4b25fec9c
Author: Florian Westphal <fw@strlen.de>
Date:   Thu Sep 23 17:04:11 2021 -0700

    mptcp: don't return sockets in foreign netns

    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: 2c5ebd001d ("mptcp: refactor token container")
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-01-12 10:49:53 +01:00
Paolo Abeni a8ee9c9b58 mptcp: introduce token KUNIT self-tests
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 <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-26 16:21:39 -07:00