Patch "mptcp: full fully established support after ADD_ADDR" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mptcp: full fully established support after ADD_ADDR

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mptcp-full-fully-established-support-after-add_addr.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c4f5123a2aa852a235984fd7c739b55ab7919eb2
Author: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>
Date:   Wed Aug 18 16:42:37 2021 -0700

    mptcp: full fully established support after ADD_ADDR
    
    [ Upstream commit 67b12f792d5eaeb8b4fca3b2053e6b819eb3bf0f ]
    
    If directly after an MP_CAPABLE 3WHS, the client receives an ADD_ADDR
    with HMAC from the server, it is enough to switch to a "fully
    established" mode because it has received more MPTCP options.
    
    It was then OK to enable the "fully_established" flag on the MPTCP
    socket. Still, best to check if the ADD_ADDR looks valid by looking if
    it contains an HMAC (no 'echo' bit). If an ADD_ADDR echo is received
    while we are not in "fully established" mode, it is strange and then
    we should not switch to this mode now.
    
    But that is not enough. On one hand, the path-manager has be notified
    the state has changed. On the other hand, the "fully_established" flag
    on the subflow socket should be turned on as well not to re-send the
    MP_CAPABLE 3rd ACK content with the next ACK.
    
    Fixes: 84dfe3677a6f ("mptcp: send out dedicated ADD_ADDR packet")
    Signed-off-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>
    Signed-off-by: Mat Martineau <mathew.j.martineau@xxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 4f08e04e1ab7..f3ec85779733 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -843,20 +843,16 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 		return subflow->mp_capable;
 	}
 
-	if (mp_opt->dss && mp_opt->use_ack) {
+	if ((mp_opt->dss && mp_opt->use_ack) ||
+	    (mp_opt->add_addr && !mp_opt->echo)) {
 		/* subflows are fully established as soon as we get any
-		 * additional ack.
+		 * additional ack, including ADD_ADDR.
 		 */
 		subflow->fully_established = 1;
 		WRITE_ONCE(msk->fully_established, true);
 		goto fully_established;
 	}
 
-	if (mp_opt->add_addr) {
-		WRITE_ONCE(msk->fully_established, true);
-		return true;
-	}
-
 	/* If the first established packet does not contain MP_CAPABLE + data
 	 * then fallback to TCP. Fallback scenarios requires a reset for
 	 * MP_JOIN subflows.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux