If the receiver sends an ack that is out of [snd_una, snd_max],

ignore the sack options in that segment. Else we'd end up
corrupting the scoreboard.

Found by:	Raja Mukerji (raja at moselle dot com)
Submitted by:	Mohan Srinivasan
This commit is contained in:
Paul Saab 2005-02-27 20:39:04 +00:00
parent edc431123e
commit 8291294024
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142688

View file

@ -301,6 +301,9 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
/* Note: TCPOLEN_SACK must be 2*sizeof(tcp_seq) */
if (optlen <= 2 || (optlen - 2) % TCPOLEN_SACK != 0)
return (1);
/* If ack is outside window, ignore the SACK options */
if (SEQ_LT(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))
return (1);
tmp_cp = cp + 2;
tmp_olen = optlen - 2;
tcpstat.tcps_sack_rcv_blocks++;