aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorChristoph Paasch <cpaasch@apple.com>2020-01-21 16:56:31 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-24 13:44:08 +0100
commitcc7972ea1932335e0a0ee00ac8a24b3e8304630d (patch)
treed21fb64626a38ba789fc9ffbedd03df45dd27b1e /net/mptcp/protocol.h
parentmptcp: move from sha1 (v0) to sha256 (v1) (diff)
downloadwireguard-linux-cc7972ea1932335e0a0ee00ac8a24b3e8304630d.tar.xz
wireguard-linux-cc7972ea1932335e0a0ee00ac8a24b3e8304630d.zip
mptcp: parse and emit MP_CAPABLE option according to v1 spec
This implements MP_CAPABLE options parsing and writing according to RFC 6824 bis / RFC 8684: MPTCP v1. Local key is sent on syn/ack, and both keys are sent on 3rd ack. MP_CAPABLE messages len are updated accordingly. We need the skbuff to correctly emit the above, so we push the skbuff struct as an argument all the way from tcp code to the relevant mptcp callbacks. When processing incoming MP_CAPABLE + data, build a full blown DSS-like map info, to simplify later processing. On child socket creation, we need to record the remote key, if available. Signed-off-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index a355bb1cf31b..36b90024d34d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -11,7 +11,7 @@
#include <net/tcp.h>
#include <net/inet_connection_sock.h>
-#define MPTCP_SUPPORTED_VERSION 0
+#define MPTCP_SUPPORTED_VERSION 1
/* MPTCP option bits */
#define OPTION_MPTCP_MPC_SYN BIT(0)
@@ -29,9 +29,10 @@
#define MPTCPOPT_MP_FASTCLOSE 7
/* MPTCP suboption lengths */
-#define TCPOLEN_MPTCP_MPC_SYN 12
+#define TCPOLEN_MPTCP_MPC_SYN 4
#define TCPOLEN_MPTCP_MPC_SYNACK 12
#define TCPOLEN_MPTCP_MPC_ACK 20
+#define TCPOLEN_MPTCP_MPC_ACK_DATA 22
#define TCPOLEN_MPTCP_DSS_BASE 4
#define TCPOLEN_MPTCP_DSS_ACK32 4
#define TCPOLEN_MPTCP_DSS_ACK64 8
@@ -106,6 +107,7 @@ struct mptcp_subflow_context {
u64 remote_key;
u64 idsn;
u64 map_seq;
+ u32 snd_isn;
u32 token;
u32 rel_write_seq;
u32 map_subflow_seq;