Merge branch 'mptcp-misc-fixes-for-6-15-rc0'
Matthieu Baerts says: ==================== mptcp: misc. fixes for 6.15-rc0 Here are 4 unrelated patches: - Patch 1: fix a NULL pointer when two SYN-ACK for the same request are handled in parallel. A fix for up to v5.9. - Patch 2: selftests: fix check for the wrong FD. A fix for up to v5.17. - Patch 3: selftests: close all FDs in case of error. A fix for up to v5.17. - Patch 4: selftests: ignore a new generated file. A fix for 6.15-rc0. ==================== Link: https://patch.msgid.link/20250328-net-mptcp-misc-fixes-6-15-v1-0-34161a482a7f@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
+8
-7
@@ -754,8 +754,6 @@ static bool subflow_hmac_valid(const struct request_sock *req,
|
||||
|
||||
subflow_req = mptcp_subflow_rsk(req);
|
||||
msk = subflow_req->msk;
|
||||
if (!msk)
|
||||
return false;
|
||||
|
||||
subflow_generate_hmac(READ_ONCE(msk->remote_key),
|
||||
READ_ONCE(msk->local_key),
|
||||
@@ -850,12 +848,8 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
|
||||
|
||||
} else if (subflow_req->mp_join) {
|
||||
mptcp_get_options(skb, &mp_opt);
|
||||
if (!(mp_opt.suboptions & OPTION_MPTCP_MPJ_ACK) ||
|
||||
!subflow_hmac_valid(req, &mp_opt) ||
|
||||
!mptcp_can_accept_new_subflow(subflow_req->msk)) {
|
||||
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINACKMAC);
|
||||
if (!(mp_opt.suboptions & OPTION_MPTCP_MPJ_ACK))
|
||||
fallback = true;
|
||||
}
|
||||
}
|
||||
|
||||
create_child:
|
||||
@@ -905,6 +899,13 @@ create_child:
|
||||
goto dispose_child;
|
||||
}
|
||||
|
||||
if (!subflow_hmac_valid(req, &mp_opt) ||
|
||||
!mptcp_can_accept_new_subflow(subflow_req->msk)) {
|
||||
SUBFLOW_REQ_INC_STATS(req, MPTCP_MIB_JOINACKMAC);
|
||||
subflow_add_reset_reason(skb, MPTCP_RST_EPROHIBIT);
|
||||
goto dispose_child;
|
||||
}
|
||||
|
||||
/* move the msk reference ownership to the subflow */
|
||||
subflow_req->msk = NULL;
|
||||
ctx->conn = (struct sock *)owner;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
mptcp_connect
|
||||
mptcp_diag
|
||||
mptcp_inq
|
||||
mptcp_sockopt
|
||||
pm_nl_ctl
|
||||
|
||||
@@ -1270,7 +1270,7 @@ int main_loop(void)
|
||||
|
||||
if (cfg_input && cfg_sockopt_types.mptfo) {
|
||||
fd_in = open(cfg_input, O_RDONLY);
|
||||
if (fd < 0)
|
||||
if (fd_in < 0)
|
||||
xerror("can't open %s:%d", cfg_input, errno);
|
||||
}
|
||||
|
||||
@@ -1293,13 +1293,13 @@ again:
|
||||
|
||||
if (cfg_input && !cfg_sockopt_types.mptfo) {
|
||||
fd_in = open(cfg_input, O_RDONLY);
|
||||
if (fd < 0)
|
||||
if (fd_in < 0)
|
||||
xerror("can't open %s:%d", cfg_input, errno);
|
||||
}
|
||||
|
||||
ret = copyfd_io(fd_in, fd, 1, 0, &winfo);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
if (cfg_truncate > 0) {
|
||||
shutdown(fd, SHUT_WR);
|
||||
@@ -1320,7 +1320,10 @@ again:
|
||||
close(fd);
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
if (cfg_input)
|
||||
close(fd_in);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int parse_proto(const char *proto)
|
||||
|
||||
Reference in New Issue
Block a user