Skip to content

Commit d5a1391

Browse files
committed
Merge branch 'mptcp-new-reviewer-and-prevent-a-warning'
Matthieu Baerts says: ==================== mptcp: new reviewer and prevent a warning Patch 1 adds MPTCP long time contributor -- Geliang Tang -- as a new reviewer for the project. Thanks! Patch 2 prevents a warning when TCP Diag is used to close internal MPTCP listener subflows. This is a correction for a patch introduced in v6.4 which was fixing an issue from v5.17. ==================== Link: https://lore.kernel.org/r/20231226-upstream-net-20231226-mptcp-prevent-warn-v1-0-1404dcc431ea@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
2 parents fe6d830 + 4c02882 commit d5a1391

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15077,6 +15077,7 @@ K: \bmdo_
1507715077
NETWORKING [MPTCP]
1507815078
M: Matthieu Baerts <[email protected]>
1507915079
M: Mat Martineau <[email protected]>
15080+
R: Geliang Tang <[email protected]>
1508015081
1508115082
1508215083
S: Maintained

net/mptcp/subflow.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,17 @@ static void tcp_release_cb_override(struct sock *ssk)
19821982
tcp_release_cb(ssk);
19831983
}
19841984

1985+
static int tcp_abort_override(struct sock *ssk, int err)
1986+
{
1987+
/* closing a listener subflow requires a great deal of care.
1988+
* keep it simple and just prevent such operation
1989+
*/
1990+
if (inet_sk_state_load(ssk) == TCP_LISTEN)
1991+
return -EINVAL;
1992+
1993+
return tcp_abort(ssk, err);
1994+
}
1995+
19851996
static struct tcp_ulp_ops subflow_ulp_ops __read_mostly = {
19861997
.name = "mptcp",
19871998
.owner = THIS_MODULE,
@@ -2026,6 +2037,7 @@ void __init mptcp_subflow_init(void)
20262037

20272038
tcp_prot_override = tcp_prot;
20282039
tcp_prot_override.release_cb = tcp_release_cb_override;
2040+
tcp_prot_override.diag_destroy = tcp_abort_override;
20292041

20302042
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
20312043
/* In struct mptcp_subflow_request_sock, we assume the TCP request sock
@@ -2061,6 +2073,7 @@ void __init mptcp_subflow_init(void)
20612073

20622074
tcpv6_prot_override = tcpv6_prot;
20632075
tcpv6_prot_override.release_cb = tcp_release_cb_override;
2076+
tcpv6_prot_override.diag_destroy = tcp_abort_override;
20642077
#endif
20652078

20662079
mptcp_diag_subflow_init(&subflow_ulp_ops);

0 commit comments

Comments
 (0)