summaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2021-04-06 17:16:00 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-07 14:09:39 -0700
commitf7dafee18538a3933f2cb9d4dcf8b98ff1276ffb (patch)
treec43fb68aacd471a4a7dd89201bd50845149314db /net/mptcp/protocol.h
parentfef6b7ecfbd465b7e27530e797c00b7384f78e44 (diff)
downloadlinux-stable-f7dafee18538a3933f2cb9d4dcf8b98ff1276ffb.tar.gz
linux-stable-f7dafee18538a3933f2cb9d4dcf8b98ff1276ffb.tar.bz2
linux-stable-f7dafee18538a3933f2cb9d4dcf8b98ff1276ffb.zip
mptcp: use mptcp_addr_info in mptcp_options_received
This patch added a new struct mptcp_addr_info member addr in struct mptcp_options_received, and dropped the original family, addr_id, addr, addr6 and port fields in it. Then we can pass the parameter mp_opt.addr directly to mptcp_pm_add_addr_received and mptcp_pm_add_addr_echoed. Since the port number became big-endian now, use htons to convert the incoming port number to it. Also use ntohs to convert it when passing it to add_addr_generate_hmac or printing it out. Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> 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 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 7c5fd06ceaf2..ca3013facbba 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -133,7 +133,6 @@ struct mptcp_options_received {
add_addr : 1,
rm_addr : 1,
mp_prio : 1,
- family : 4,
echo : 1,
backup : 1;
u32 token;
@@ -148,16 +147,9 @@ struct mptcp_options_received {
ack64:1,
mpc_map:1,
__unused:2;
- u8 addr_id;
+ struct mptcp_addr_info addr;
struct mptcp_rm_list rm_list;
- union {
- struct in_addr addr;
-#if IS_ENABLED(CONFIG_MPTCP_IPV6)
- struct in6_addr addr6;
-#endif
- };
u64 ahmac;
- u16 port;
u8 reset_reason:4;
u8 reset_transient:1;
};