Bug 248213 - [tcp] TCP BBR - Two FINs with same seq number are seen in simultaneous close
Summary: [tcp] TCP BBR - Two FINs with same seq number are seen in simultaneous close
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Michael Tuexen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-23 17:11 UTC by Hitesh
Modified: 2020-10-23 15:10 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
			}