Fix for a bug in tcp_sack_option() causing crashes.

Submitted by:	Noritoshi Demizu, Mohan Srinivasan.
Approved by:	re (scottl blanket SACK)
This commit is contained in:
Paul Saab 2005-06-23 00:18:54 +00:00
parent 3adc17c503
commit 9004ded9df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147535

View File

@ -474,8 +474,7 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
* Since the incoming sack blocks are sorted, we can process them
* making one sweep of the scoreboard.
*/
while (sblkp - sack_blocks >= 0) {
KASSERT(cur != NULL, ("cur != NULL"));
while (sblkp - sack_blocks >= 0 && cur != NULL) {
if (SEQ_GEQ(sblkp->start, cur->end)) {
/*
* SACKs data beyond the current hole.