]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbe616d365faae1f43940d0ac427dc747dbef54ba
treebbb3232dcaefbcb2c69c67e614896acaddacdbb7
parentbf9d148f2c42a0872511b6ab94330117a8ef5df6
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