OSDN Git Service

mptcp: move first subflow allocation at mpc access time
authorPaolo Abeni <pabeni@redhat.com>
Fri, 14 Apr 2023 14:08:03 +0000 (16:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2023 07:18:34 +0000 (08:18 +0100)
commitddb1a072f858704b3555876877ca38c5b103a215
tree6a0c776a01eaf05c6cd6b86ce20f8a1d1323fdac
parenta2702a076e73787db660fb8fd07d26a1a3108358
mptcp: move first subflow allocation at mpc access time

In the long run this will simplify the mptcp code and will
allow for more consistent behavior. Move the first subflow
allocation out of the sock->init ops into the __mptcp_nmpc_socket()
helper.

Since the first subflow creation can now happen after the first
setsockopt() we additionally need to invoke mptcp_sockopt_sync()
on it.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/sockopt.c