mptcp: tag sequence_seq with socket state
authorFlorian Westphal <fw@strlen.de>
Thu, 15 Apr 2021 23:44:54 +0000 (16:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 22:23:10 +0000 (15:23 -0700)
commitdf00b087da24c0b5341178bbd5353101c7cef98f
tree8a9549390250f02c0ab83927b1a6f62c23432081
parent7896248983ef4eec18c8bd301a81d8672dbc9955
mptcp: tag sequence_seq with socket state

Paolo Abeni suggested to avoid re-syncing new subflows because
they inherit options from listener. In case options were set on
listener but are not set on mptcp-socket there is no need to
do any synchronisation for new subflows.

This change sets sockopt_seq of new mptcp sockets to the seq of
the mptcp listener sock.

Subflow sequence is set to the embedded tcp listener sk.
Add a comment explaing why sk_state is involved in sockopt_seq
generation.

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