This fixes two issues found by ankitraheja09@gmail.com
1) When BBR retransmits the syn it was messing up the snd_max 2) When we need to send a RST we might not send it when we should Reported by: ankitraheja09@gmail.com Sponsored by: Netflix.com Differential Revision: https://reviews.freebsd.org/D24693
This commit is contained in:
parent
ad5570559b
commit
570045a0fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360644
@ -12159,6 +12159,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
|
||||
recwin = min(max(sbspace(&so->so_rcv), 0),
|
||||
TCP_MAXWIN << tp->rcv_scale);
|
||||
if ((bbr_window_update_needed(tp, so, recwin, maxseg) == 0) &&
|
||||
((tcp_outflags[tp->t_state] & TH_RST) == 0) &&
|
||||
((sbavail(sb) + ((tcp_outflags[tp->t_state] & TH_FIN) ? 1 : 0)) <=
|
||||
(tp->snd_max - tp->snd_una))) {
|
||||
/*
|
||||
@ -12916,7 +12917,11 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
|
||||
if (tp->t_flags & TF_ACKNOW) {
|
||||
goto send;
|
||||
}
|
||||
if (((flags & TH_SYN) && (tp->t_flags & TF_NEEDSYN) == 0)) {
|
||||
if (flags & TH_RST) {
|
||||
/* Always send a RST if one is due */
|
||||
goto send;
|
||||
}
|
||||
if ((flags & TH_SYN) && (tp->t_flags & TF_NEEDSYN) == 0) {
|
||||
goto send;
|
||||
}
|
||||
/*
|
||||
@ -14029,7 +14034,11 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
|
||||
}
|
||||
if (flags & (TH_SYN | TH_FIN) && (rsm == NULL)) {
|
||||
if (flags & TH_SYN) {
|
||||
tp->snd_max++;
|
||||
/*
|
||||
* Smack the snd_max to iss + 1
|
||||
* if its a FO we will add len below.
|
||||
*/
|
||||
tp->snd_max = tp->iss + 1;
|
||||
}
|
||||
if ((flags & TH_FIN) && ((tp->t_flags & TF_SENTFIN) == 0)) {
|
||||
tp->snd_max++;
|
||||
|
Loading…
Reference in New Issue
Block a user