Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f467790c authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "tcp: Reset tcp connections in SYN-SENT state"

parents a98685fc cafaa301
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2309,7 +2309,7 @@ static inline bool tcp_need_reset(int state)
{
	return (1 << state) &
	       (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT | TCPF_FIN_WAIT1 |
		TCPF_FIN_WAIT2 | TCPF_SYN_RECV);
		TCPF_FIN_WAIT2 | TCPF_SYN_RECV | TCPF_SYN_SENT);
}

int tcp_disconnect(struct sock *sk, int flags)
@@ -2336,8 +2336,7 @@ int tcp_disconnect(struct sock *sk, int flags)
		 */
		tcp_send_active_reset(sk, gfp_any());
		sk->sk_err = ECONNRESET;
	} else if (old_state == TCP_SYN_SENT)
		sk->sk_err = ECONNRESET;
	}

	tcp_clear_xmit_timers(sk);
	__skb_queue_purge(&sk->sk_receive_queue);