mptcp: full fully established support after ADD_ADDR
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Wed, 18 Aug 2021 23:42:37 +0000 (16:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Aug 2021 11:16:54 +0000 (12:16 +0100)
commit67b12f792d5eaeb8b4fca3b2053e6b819eb3bf0f
treea92b17a02bfb37837d77fd7068b12e3e493d76e8
parenta0eea5f10eeb5180d115452b0d77afa6603dfe18
mptcp: full fully established support after ADD_ADDR

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@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c