mptcp: cache msk on MP_JOIN init_req
authorPaolo Abeni <pabeni@redhat.com>
Wed, 17 Jun 2020 10:08:56 +0000 (12:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 03:25:51 +0000 (20:25 -0700)
commit8fd4de1275580a1befa1456d1070eaf6489fb48f
treec3f4112be44ae124eccc0306e0425825703d3d94
parent5eea3a63ff4aba6a26002e657a6d21934b7e2b96
mptcp: cache msk on MP_JOIN init_req

The msk ownership is transferred to the child socket at
3rd ack time, so that we avoid more lookups later. If the
request does not reach the 3rd ack, the MSK reference is
dropped at request sock release time.

As a side effect, fallback is now tracked by a NULL msk
reference instead of zeroed 'mp_join' field. This will
simplify the next patch.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.h
net/mptcp/subflow.c