]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mptcp: use mptcp_addr_info in mptcp_out_options
authorGeliang Tang <geliangtang@gmail.com>
Wed, 7 Apr 2021 00:15:58 +0000 (17:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2021 21:09:39 +0000 (14:09 -0700)
commit30f60bae80922582a16e80b070171a865fce58cd
tree0a3147a613548e0294a595424559deb2aa8919ce
parentdaa83ab039546a906953f1821e493ddc980ed889
mptcp: use mptcp_addr_info in mptcp_out_options

This patch moved the mptcp_addr_info struct from protocol.h to mptcp.h,
added a new struct mptcp_addr_info member addr in struct mptcp_out_options,
and dropped the original addr, addr6, addr_id and port fields in it. Then
we can use opts->addr to get the adding address from PM directly using
mptcp_pm_add_addr_signal.

Since the port number became big-endian now, use ntohs to convert it
before sending it out with the ADD_ADDR suboption. Also 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>
include/net/mptcp.h
net/mptcp/options.c
net/mptcp/protocol.h