Unverified Commit 8330907b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 8a5965ae 9115e45a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3752,8 +3752,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
	 * then we can probably ignore it.
	 */
	if (before(ack, prior_snd_una)) {
		u32 max_window;

		/* do not accept ACK for bytes we never sent. */
		max_window = min_t(u64, tp->max_window, tp->bytes_acked);
		/* RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] */
		if (before(ack, prior_snd_una - tp->max_window)) {
		if (before(ack, prior_snd_una - max_window)) {
			if (!(flag & FLAG_NO_CHALLENGE_ACK))
				tcp_send_challenge_ack(sk, skb);
			return -1;