Skip to content

Commit a8a9248

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 84722b6 commit a8a9248

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()
@@ -40,12 +41,13 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf
4041
*/
4142
tp->copied_seq += skb->len;
4243
subflow->ssn_offset += skb->len;
44+
has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
4345

4446
/* Only the sequence delta is relevant */
4547
MPTCP_SKB_CB(skb)->map_seq = -skb->len;
4648
MPTCP_SKB_CB(skb)->end_seq = 0;
4749
MPTCP_SKB_CB(skb)->offset = 0;
48-
MPTCP_SKB_CB(skb)->has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
50+
MPTCP_SKB_CB(skb)->has_rxtstamp = has_rxtstamp;
4951
MPTCP_SKB_CB(skb)->cant_coalesce = 1;
5052

5153
mptcp_data_lock(sk);

0 commit comments

Comments
 (0)