From fdace17f81a53a511db862fae5f4a0998a6e6fb1 Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Fri, 13 May 2005 18:02:02 +0000 Subject: [PATCH] Fix for a bug where the "nexthole" sack hint is out of sync with the real next hole to retransmit from the scoreboard, caused by a bug which did not update the "nexthole" hint in one case in tcp_sack_option(). Reported by: Daniel Eriksson Submitted by: Mohan Srinivasan --- sys/netinet/tcp_sack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 924228f47140..aec8400e33c4 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -452,6 +452,8 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen) tp->snd_numholes++; tcp_sack_globalholes++; TAILQ_INSERT_TAIL(&tp->snd_holes, temp, scblink); + if (tp->sackhint.nexthole == NULL) + tp->sackhint.nexthole = temp; } if (SEQ_LT(tp->rcv_lastsack, sack.end)) tp->rcv_lastsack = sack.end;