summaryrefslogtreecommitdiff
path: root/include/net/mptcp.h
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2021-03-13 04:16:11 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-13 04:47:45 +0300
commit6445e17af7c58b8a9be8ebf400b04c65202f6497 (patch)
tree67e4c90f2383b8cfe6b7754eb61f4d4c48386d48 /include/net/mptcp.h
parente9e90a70cc2d5690b84c7ca2f604e09a85222bb1 (diff)
downloadlinux-6445e17af7c58b8a9be8ebf400b04c65202f6497.tar.xz
mptcp: add rm_list in mptcp_out_options
This patch defined a new struct mptcp_rm_list, the ids field was an array of the removing address ids, the nr field was the valid number of removing address ids in the array. The array size was definced as a new macro MPTCP_RM_IDS_MAX. Changed the member rm_id of struct mptcp_out_options to rm_list. In mptcp_established_options_rm_addr, invoked mptcp_pm_rm_addr_signal to get the rm_list. According the number of addresses in it, calculated the padded RM_ADDR suboption length. And saved the ids array in struct mptcp_out_options's rm_list member. In mptcp_write_options, iterated each address id from struct mptcp_out_options's rm_list member, set the invalid ones as TCPOPT_NOP, then filled them into the RM_ADDR suboption. Changed TCPOLEN_MPTCP_RM_ADDR_BASE from 4 to 3. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/mptcp.h')
-rw-r--r--include/net/mptcp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index 5694370be3d4..cea69c801595 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -34,6 +34,13 @@ struct mptcp_ext {
/* one byte hole */
};
+#define MPTCP_RM_IDS_MAX 8
+
+struct mptcp_rm_list {
+ u8 ids[MPTCP_RM_IDS_MAX];
+ u8 nr;
+};
+
struct mptcp_out_options {
#if IS_ENABLED(CONFIG_MPTCP)
u16 suboptions;
@@ -48,7 +55,7 @@ struct mptcp_out_options {
u8 addr_id;
u16 port;
u64 ahmac;
- u8 rm_id;
+ struct mptcp_rm_list rm_list;
u8 join_id;
u8 backup;
u32 nonce;