Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147977822
D23373.1784990080.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D23373.1784990080.diff
View Options
Index: head/sys/netinet/tcp_input.c
===================================================================
--- head/sys/netinet/tcp_input.c
+++ head/sys/netinet/tcp_input.c
@@ -1611,6 +1611,14 @@
* XXX this is traditional behavior, may need to be cleaned up.
*/
if (tp->t_state == TCPS_SYN_SENT && (thflags & TH_SYN)) {
+ /* Handle parallel SYN for ECN */
+ if (!(thflags & TH_ACK) &&
+ ((thflags & (TH_CWR | TH_ECE)) == (TH_CWR | TH_ECE)) &&
+ ((V_tcp_do_ecn == 1) || (V_tcp_do_ecn == 2))) {
+ tp->t_flags2 |= TF2_ECN_PERMIT;
+ tp->t_flags2 |= TF2_ECN_SND_ECE;
+ TCPSTAT_INC(tcps_ecn_shs);
+ }
if ((to.to_flags & TOF_SCALE) &&
(tp->t_flags & TF_REQ_SCALE)) {
tp->t_flags |= TF_RCVD_SCALE;
Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -1154,6 +1154,12 @@
} else
flags |= TH_ECE|TH_CWR;
}
+ /* Handle parallel SYN for ECN */
+ if ((tp->t_state == TCPS_SYN_RECEIVED) &&
+ (tp->t_flags2 & TF2_ECN_SND_ECE)) {
+ flags |= TH_ECE;
+ tp->t_flags2 &= ~TF2_ECN_SND_ECE;
+ }
if (tp->t_state == TCPS_ESTABLISHED &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
Index: head/sys/netinet/tcp_stacks/rack.c
===================================================================
--- head/sys/netinet/tcp_stacks/rack.c
+++ head/sys/netinet/tcp_stacks/rack.c
@@ -11070,6 +11070,14 @@
* this is traditional behavior, may need to be cleaned up.
*/
if (tp->t_state == TCPS_SYN_SENT && (thflags & TH_SYN)) {
+ /* Handle parallel SYN for ECN */
+ if (!(thflags & TH_ACK) &&
+ ((thflags & (TH_CWR | TH_ECE)) == (TH_CWR | TH_ECE)) &&
+ ((V_tcp_do_ecn == 1) || (V_tcp_do_ecn == 2))) {
+ tp->t_flags2 |= TF2_ECN_PERMIT;
+ tp->t_flags2 |= TF2_ECN_SND_ECE;
+ TCPSTAT_INC(tcps_ecn_shs);
+ }
if ((to.to_flags & TOF_SCALE) &&
(tp->t_flags & TF_REQ_SCALE)) {
tp->t_flags |= TF_RCVD_SCALE;
@@ -13522,6 +13530,12 @@
flags |= TH_ECE | TH_CWR;
} else
flags |= TH_ECE | TH_CWR;
+ }
+ /* Handle parallel SYN for ECN */
+ if ((tp->t_state == TCPS_SYN_RECEIVED) &&
+ (tp->t_flags2 & TF2_ECN_SND_ECE)) {
+ flags |= TH_ECE;
+ tp->t_flags2 &= ~TF2_ECN_SND_ECE;
}
if (tp->t_state == TCPS_ESTABLISHED &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 2:34 PM (5 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29256544
Default Alt Text
D23373.1784990080.diff (2 KB)
Attached To
Mode
D23373: Handle ECN handshake in simultaneous open
Attached
Detach File
Event Timeline
Log In to Comment