Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_output.c
Show First 20 Lines • Show All 1,198 Lines • ▼ Show 20 Lines | #endif | ||||
* SYN packet. If we are on a retransmit, we may | * SYN packet. If we are on a retransmit, we may | ||||
* resend those bits a number of times as per | * resend those bits a number of times as per | ||||
* RFC 3168. | * RFC 3168. | ||||
*/ | */ | ||||
if (tp->t_state == TCPS_SYN_SENT && V_tcp_do_ecn) { | if (tp->t_state == TCPS_SYN_SENT && V_tcp_do_ecn) { | ||||
flags |= tcp_ecn_output_syn_sent(tp); | flags |= tcp_ecn_output_syn_sent(tp); | ||||
} | } | ||||
/* Also handle parallel SYN for ECN */ | /* Also handle parallel SYN for ECN */ | ||||
if ((TCPS_HAVERCVDSYN(tp->t_state)) && | if ((tp->t_flags2 & TF2_ECN_PLUSPLUS) || | ||||
(tp->t_flags2 & TF2_ECN_PERMIT)) { | (TCPS_HAVERCVDSYN(tp->t_state) && | ||||
(tp->t_flags2 & TF2_ECN_PERMIT))) { | |||||
int ect = tcp_ecn_output_established(tp, &flags, len); | int ect = tcp_ecn_output_established(tp, &flags, len); | ||||
if ((tp->t_state == TCPS_SYN_RECEIVED) && | if ((tp->t_state == TCPS_SYN_RECEIVED) && | ||||
(tp->t_flags2 & TF2_ECN_SND_ECE)) | (tp->t_flags2 & TF2_ECN_SND_ECE)) | ||||
tp->t_flags2 &= ~TF2_ECN_SND_ECE; | tp->t_flags2 &= ~TF2_ECN_SND_ECE; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (isipv6) { | if (isipv6) { | ||||
ip6->ip6_flow &= ~htonl(IPTOS_ECN_MASK << 20); | ip6->ip6_flow &= ~htonl(IPTOS_ECN_MASK << 20); | ||||
ip6->ip6_flow |= htonl(ect << 20); | ip6->ip6_flow |= htonl(ect << 20); | ||||
▲ Show 20 Lines • Show All 959 Lines • Show Last 20 Lines |