mptcp: Initialize map_seq upon subflow establishment
Subsystems (3)
PATCH 1/1 mptcp: Initialize map_seq upon subflow establishment
When the other MPTCP-peer uses 32-bit data-sequence numbers, we rely on map_seq to indicate how to expand to a 64-bit data-sequence number in expand_seq() when receiving data.
For new subflows, this field is not initialized, thus results in an "invalid" mapping being discarded.
Fix this by initializing map_seq upon subflow establishment time.
--- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/protocol.c +2 -0
@@ -1629,6 +1629,8 @@ bool mptcp_finish_join(struct sock *sk) ret =mptcp_pm_allow_new_subflow (msk);if (ret) { + subflow->map_seq = msk->ack_seq; +/* active connections are already on conn_list */ spin_lock_bh (&msk->join_list_lock);if (!WARN_ON_ONCE (!list_empty (&subflow->node)))
Signature · 1 line
2.23.0
Quoted 20 lines · Christoph Paasch
When the other MPTCP-peer uses 32-bit data-sequence numbers, we rely on
map_seqto indicate how to expand to a 64-bit data-sequence number inexpand_seq()when receiving data.For new subflows, this field is not initialized, thus results in an "invalid" mapping being discarded.
Fix this by initializing
map_sequpon subflow establishment time.Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Signed-off-by Christoph Paasch <cpaasch(a)apple.com>--- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+)net/mptcp/protocol.c +0
-0
net/mptcp/protocol.c bool mptcp_finish_join(struct sock *sk) · line 1636
Quoted 8 lines
net/mptcp/protocol.c +2
-0@@ -1629,6 +1629,8 @@ bool mptcp_finish_join(struct sock *sk) ret =mptcp_pm_allow_new_subflow (msk);if (ret) { + subflow->map_seq = msk->ack_seq; +/* active connections are already on conn_list */ spin_lock_bh (&msk->join_list_lock);if (!WARN_ON_ONCE (!list_empty (&subflow->node)))
From: Paolo Abeni <pabeni(a)redhat.com>
Date: Mon, 11 May 2020 19:35:21 +0200
Quoted 12 lines · Christoph Paasch
Quoted 11 lines
When the other MPTCP-peer uses 32-bit data-sequence numbers, we rely on
map_seqto indicate how to expand to a 64-bit data-sequence number inexpand_seq()when receiving data.For new subflows, this field is not initialized, thus results in an "invalid" mapping being discarded.
Fix this by initializing
map_sequpon subflow establishment time.Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
...
Quoted 1 line
Reviewed-by Paolo Abeni <pabeni(a)redhat.com>
Applied, thanks.