[PATCH mptcp-next 1/6] mptcp: copy the subflow's rcv_tos to the msk on accept
Geliang Tang <[email protected]> Sat, 25 Jul 2026 21:13:38 +0800
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Message-ID | <8ea981071171105d5688a5c4a182a9c1f25624eb.1784985085.git.tanggeliang@kylinos.cn> |
From: Geliang Tang <[email protected]> The server-side master socket never inherited the tos seen in the peer's SYN. mptcp_sk_clone_init() now copies ssk->rcv_tos onto nsk so inet->rcv_tos on the accepted msk reflects the peer's tos byte (matching plain TCP). Signed-off-by: Geliang Tang <[email protected]> --- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 954e20bb27de..178cd8de990b 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3699,6 +3699,8 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, #endif mptcp_copy_ip_options(nsk, sk); + inet_sk(nsk)->rcv_tos = inet_sk(ssk)->rcv_tos; + msk = mptcp_sk(nsk); WRITE_ONCE(msk->local_key, subflow_req->local_key); WRITE_ONCE(msk->token, subflow_req->token); -- 2.53.0