mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 23:03:55 +00:00
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:
parent
edc431123e
commit
8291294024
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142688
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue