mptcp: reset subflow when MP_FAIL doesn't respond
This patch adds a new msk->flags bit MPTCP_FAIL_NO_RESPONSE, then reuses sk_timer to trigger a check if we have not received a response from the peer after sending MP_FAIL. If the peer doesn't respond properly, reset the subflow. Signed-off-by: Geliang Tang <geliang.tang@suse.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9c81be0dbc
commit
49fa1919d6
@@ -287,6 +287,7 @@ void mptcp_pm_mp_fail_received(struct sock *sk, u64 fail_seq)
|
||||
{
|
||||
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
|
||||
struct mptcp_sock *msk = mptcp_sk(subflow->conn);
|
||||
struct sock *s = (struct sock *)msk;
|
||||
|
||||
pr_debug("fail_seq=%llu", fail_seq);
|
||||
|
||||
@@ -299,6 +300,13 @@ void mptcp_pm_mp_fail_received(struct sock *sk, u64 fail_seq)
|
||||
subflow->send_mp_fail = 1;
|
||||
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPFAILTX);
|
||||
subflow->send_infinite_map = 1;
|
||||
} else if (s && inet_sk_state_load(s) != TCP_CLOSE) {
|
||||
pr_debug("MP_FAIL response received");
|
||||
|
||||
mptcp_data_lock(s);
|
||||
if (inet_sk_state_load(s) != TCP_CLOSE)
|
||||
sk_stop_timer(s, &s->sk_timer);
|
||||
mptcp_data_unlock(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user