summaryrefslogtreecommitdiff
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2021-03-26 11:26:38 -0700
committerDavid S. Miller <davem@davemloft.net>2021-03-26 15:05:15 -0700
commit557963c383e8209b14de91bf2a0301a41b94d8c4 (patch)
tree1c3b382022c56e8e7996963382d884203884f2d0 /net/mptcp/options.c
parentd88c476f4a7dd69a2588470f6c4f8b663efa16c6 (diff)
mptcp: move to next addr when subflow creation fail
When an invalid address was announced, the subflow couldn't be created for this address. Therefore mptcp_pm_nl_subflow_established couldn't be invoked. Then the next addresses in the local address list didn't have a chance to be announced. This patch invokes the new function mptcp_pm_add_addr_echoed when the address is echoed. In it, use mptcp_lookup_anno_list_by_saddr to check whether this address is in the anno_list. If it is, PM schedules the status MPTCP_PM_SUBFLOW_ESTABLISHED to invoke mptcp_pm_create_subflow_or_signal_addr to deal with the next address in the local address list. 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/options.c')
-rw-r--r--net/mptcp/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 2d2340b22f61..69cafaacc31b 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1040,6 +1040,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
mptcp_pm_add_addr_received(msk, &addr);
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ADDADDR);
} else {
+ mptcp_pm_add_addr_echoed(msk, &addr);
mptcp_pm_del_add_timer(msk, &addr);
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ECHOADD);
}