All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH net] mptcp: Initialize map_seq upon subflow establishment
@ 2020-05-11 16:24 ` Christoph Paasch
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Paasch @ 2020-05-11 16:24 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

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.

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(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index e1f23016ed3f..32ea8d35489a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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)))
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net] mptcp: Initialize map_seq upon subflow establishment
@ 2020-05-11 16:24 ` Christoph Paasch
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Paasch @ 2020-05-11 16:24 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, mptcp, Mat Martineau, Matthieu Baerts

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.

Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
---
 net/mptcp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index e1f23016ed3f..32ea8d35489a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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)))
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [MPTCP] Re: [PATCH net] mptcp: Initialize map_seq upon subflow establishment
  2020-05-11 16:24 ` Christoph Paasch
@ 2020-05-11 17:35 ` Paolo Abeni
  -1 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-05-11 17:35 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

On Mon, 2020-05-11 at 09:24 -0700, Christoph Paasch wrote:
> 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.
> 
> 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(+)
> 
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index e1f23016ed3f..32ea8d35489a 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -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)))

Reviewed-by: Paolo Abeni <pabeni(a)redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [MPTCP] [PATCH net] mptcp: Initialize map_seq upon subflow establishment
@ 2020-05-11 17:35 ` Paolo Abeni
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-05-11 17:35 UTC (permalink / raw)
  To: Christoph Paasch, David Miller, Jakub Kicinski; +Cc: netdev, mptcp

On Mon, 2020-05-11 at 09:24 -0700, Christoph Paasch wrote:
> 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.
> 
> Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>
> ---
>  net/mptcp/protocol.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index e1f23016ed3f..32ea8d35489a 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -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)))

Reviewed-by: Paolo Abeni <pabeni@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [MPTCP] Re: [PATCH net] mptcp: Initialize map_seq upon subflow establishment
  2020-05-11 17:35 ` [MPTCP] " Paolo Abeni
@ 2020-05-12 19:09 ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-05-12 19:09 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

From: Paolo Abeni <pabeni(a)redhat.com>
Date: Mon, 11 May 2020 19:35:21 +0200

> On Mon, 2020-05-11 at 09:24 -0700, Christoph Paasch wrote:
>> 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.
>> 
>> Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
>> Signed-off-by: Christoph Paasch <cpaasch(a)apple.com>
 ...
> Reviewed-by: Paolo Abeni <pabeni(a)redhat.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [MPTCP] [PATCH net] mptcp: Initialize map_seq upon subflow establishment
@ 2020-05-12 19:09 ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-05-12 19:09 UTC (permalink / raw)
  To: pabeni; +Cc: cpaasch, kuba, netdev, mptcp

From: Paolo Abeni <pabeni@redhat.com>
Date: Mon, 11 May 2020 19:35:21 +0200

> On Mon, 2020-05-11 at 09:24 -0700, Christoph Paasch wrote:
>> 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.
>> 
>> Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
>> Signed-off-by: Christoph Paasch <cpaasch@apple.com>
 ...
> Reviewed-by: Paolo Abeni <pabeni@redhat.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-12 19:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 17:35 [MPTCP] Re: [PATCH net] mptcp: Initialize map_seq upon subflow establishment Paolo Abeni
2020-05-11 17:35 ` [MPTCP] " Paolo Abeni
  -- strict thread matches above, loose matches on Subject: below --
2020-05-12 19:09 [MPTCP] " David Miller
2020-05-12 19:09 ` [MPTCP] " David Miller
2020-05-11 16:24 Christoph Paasch
2020-05-11 16:24 ` Christoph Paasch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.