Bug 248213

Summary: [tcp] TCP BBR - Two FINs with same seq number are seen in simultaneous close
Product: Base System Reporter: Hitesh <maisheri.hitesh>
Component: kernAssignee: Michael Tuexen <tuexen>
Status: New ---    
Severity: Affects Many People CC: markj, rrs, tuexen
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Hitesh 2020-07-23 17:11:29 UTC
In simultaneous close case the seq number for the FIN ACK at CLOSING state is not incremented for TCP BBR algorithm.
Comment 1 Hitesh 2020-07-23 17:23:00 UTC
(In reply to Hitesh from comment #0)
The behavior seems to be in non-compliance with RFC 793.
Comment 2 Hitesh 2020-07-23 17:27:29 UTC
The following block  of code is what causing the non-conformance with RFC. Also, the validation for FIN flag here is redundant.

			if (flags & TH_FIN && tp->t_flags & TF_SENTFIN) {
				/*
				 * If we sent the fin already its 1 minus
				 * snd_max
				 */
				th->th_seq = (htonl(tp->snd_max - 1));
				bbr_seq = (tp->snd_max - 1);
			} else {
				/* First time FIN use snd_max */
				th->th_seq = htonl(tp->snd_max);
				bbr_seq = tp->snd_max;
			}