mptcp: skip connecting the connected address
authorGeliang Tang <geliangtang@gmail.com>
Fri, 26 Mar 2021 18:26:32 +0000 (11:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Mar 2021 22:05:15 +0000 (15:05 -0700)
commitd84ad04941c3e30dec193d4c39fce07a4c513cb4
treef5ac835ea4103ea5100e2a20afd3fc9cb9d58b7d
parentf7efc7771eac1d149c8981a6d203bce6f1c49210
mptcp: skip connecting the connected address

This patch added a new helper named lookup_subflow_by_daddr to find
whether the destination address is in the msk's conn_list.

In mptcp_pm_nl_add_addr_received, use lookup_subflow_by_daddr to check
whether the announced address is already connected. If it is, skip
connecting this address and send out the echo.

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>
net/mptcp/pm_netlink.c