Certain (bad) values of sack blocks can end up corrupting the sack scoreboard.

Make the checks in tcp_sack_doack() more robust to prevent this.

Submitted by: Raja Mukerji (raja@mukerji.com)
Reviewed by:  Mohan Srinivasan
This commit is contained in:
Mohan Srinivasan 2006-04-05 00:11:04 +00:00
parent dbafaeca13
commit 1f65c2cd31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157526

View File

@ -392,6 +392,8 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
if (SEQ_GT(sack.end, sack.start) &&
SEQ_GT(sack.start, tp->snd_una) &&
SEQ_GT(sack.start, th_ack) &&
SEQ_LT(sack.start, tp->snd_max) &&
SEQ_GT(sack.end, tp->snd_una) &&
SEQ_LEQ(sack.end, tp->snd_max))
sack_blocks[num_sack_blks++] = sack;
}