mptcp: Protect subflow socket options before connection completes
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Fri, 14 Feb 2020 22:14:29 +0000 (14:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2020 03:20:18 +0000 (19:20 -0800)
commitb6e4a1aeeb14cad595f70b31cc376903d322c821
treebbb3232dcaefbcb2c69c67e614896acaddacdbb7
parent6f08e98d62799e53c89dbf2c9a49d77e20ca648c
mptcp: Protect subflow socket options before connection completes

Userspace should not be able to directly manipulate subflow socket
options before a connection is established since it is not yet known if
it will be an MPTCP subflow or a TCP fallback subflow. TCP fallback
subflows can be more directly controlled by userspace because they are
regular TCP connections, while MPTCP subflow sockets need to be
configured for the specific needs of MPTCP. Use the same logic as
sendmsg/recvmsg to ensure that socket option calls are only passed
through to known TCP fallback subflows.

Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c