diff options
author | Geliang Tang <geliangtang@gmail.com> | 2020-12-09 15:51:20 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-09 19:02:15 -0800 |
commit | 22fb85ffaefb80a22c815008a500273b3f61bba3 (patch) | |
tree | 77ba46a7f23fba32cd5de9bc990591f1ccdb3dcc /include/net | |
parent | e1ef6832224aa62b36ba98a1a7c183e41962590c (diff) | |
download | linux-22fb85ffaefb80a22c815008a500273b3f61bba3.tar.bz2 |
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')
-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; |