mptcp: add mptcp reset option support
authorFlorian Westphal <fw@strlen.de>
Thu, 1 Apr 2021 23:19:44 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Apr 2021 21:21:50 +0000 (14:21 -0700)
commitdc87efdb1a5cd46134a9d490480160e303bc6eef
tree57040990350f1bf27ddecf5f015c445fcf4b888f
parent781bf13d4f3b033002f7f6728ac0b0d1ebe8f176
mptcp: add mptcp reset option support

The MPTCP reset option allows to carry a mptcp-specific error code that
provides more information on the nature of a connection reset.

Reset option data received gets stored in the subflow context so it can
be sent to userspace via the 'subflow closed' netlink event.

When a subflow is closed, the desired error code that should be sent to
the peer is also placed in the subflow context structure.

If a reset is sent before subflow establishment could complete, e.g. on
HMAC failure during an MP_JOIN operation, the mptcp skb extension is
used to store the reset information.

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>
include/net/mptcp.h
include/uapi/linux/mptcp.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
net/mptcp/options.c
net/mptcp/pm_netlink.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c