Skip to content

Commit e6ad28d

Browse files
Paolo Abenigregkh
authored andcommitted
mptcp: fix rx timestamp corruption on fastopen
commit 6254a16 upstream. The skb cb offset containing the timestamp presence flag is cleared before loading such information. Cache such value before MPTCP CB initialization. Fixes: 36b122b ("mptcp: add subflow_v(4,6)_send_synack()") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260501-net-mptcp-misc-fixes-7-1-rc3-v1-3-b70118df778e@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e083d1d commit e6ad28d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

net/mptcp/fastopen.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf
1212
struct sock *sk, *ssk;
1313
struct sk_buff *skb;
1414
struct tcp_sock *tp;
15+
bool has_rxtstamp;
1516

1617
/* on early fallback the subflow context is deleted by
1718
* subflow_syn_recv_sock()
@@ -39,12 +40,13 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf
3940
*/
4041
tp->copied_seq += skb->len;
4142
subflow->ssn_offset += skb->len;
43+
has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
4244

4345
/* Only the sequence delta is relevant */
4446
MPTCP_SKB_CB(skb)->map_seq = -skb->len;
4547
MPTCP_SKB_CB(skb)->end_seq = 0;
4648
MPTCP_SKB_CB(skb)->offset = 0;
47-
MPTCP_SKB_CB(skb)->has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
49+
MPTCP_SKB_CB(skb)->has_rxtstamp = has_rxtstamp;
4850
MPTCP_SKB_CB(skb)->cant_coalesce = 1;
4951

5052
mptcp_data_lock(sk);

0 commit comments

Comments
 (0)