diff options
author | Geliang Tang <geliangtang@gmail.com> | 2020-12-10 00:51:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-10 04:02:15 +0100 |
commit | 22fb85ffaefb80a22c815008a500273b3f61bba3 (patch) | |
tree | 77ba46a7f23fba32cd5de9bc990591f1ccdb3dcc /include/net/mptcp.h | |
parent | mptcp: unify ADD_ADDR and ADD_ADDR6 suboptions writing (diff) | |
download | linux-22fb85ffaefb80a22c815008a500273b3f61bba3.tar.xz linux-22fb85ffaefb80a22c815008a500273b3f61bba3.zip |
mptcp: add port support for ADD_ADDR suboption writing
In rfc8684, the length of ADD_ADDR suboption with IPv4 address and port
is 18 octets, but mptcp_write_options is 32-bit aligned, so we need to
pad it to 20 octets. All the other port related option lengths need to
be added up 2 octets similarly.
This patch added a new field 'port' in mptcp_out_options. When this
field is set with a port number, we need to add up 4 octets for the
ADD_ADDR suboption, and put the port number into the suboption.
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/mptcp.h b/include/net/mptcp.h index b6cf07143a8a..5694370be3d4 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -46,6 +46,7 @@ struct mptcp_out_options { #endif }; u8 addr_id; + u16 port; u64 ahmac; u8 rm_id; u8 join_id; |