Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 11,312 Lines • ▼ Show 20 Lines | #endif | ||||
/* | /* | ||||
* Received initial SYN in SYN-SENT[*] state => simultaneous | * Received initial SYN in SYN-SENT[*] state => simultaneous | ||||
* open. If segment contains CC option and there is a | * open. If segment contains CC option and there is a | ||||
* cached CC, apply TAO test. If it succeeds, connection is * | * cached CC, apply TAO test. If it succeeds, connection is * | ||||
* half-synchronized. Otherwise, do 3-way handshake: | * half-synchronized. Otherwise, do 3-way handshake: | ||||
* SYN-SENT -> SYN-RECEIVED SYN-SENT* -> SYN-RECEIVED* If | * SYN-SENT -> SYN-RECEIVED SYN-SENT* -> SYN-RECEIVED* If | ||||
* there was no CC option, clear cached CC value. | * there was no CC option, clear cached CC value. | ||||
*/ | */ | ||||
tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN); | tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN | TF_SONOTCONN); | ||||
tcp_state_change(tp, TCPS_SYN_RECEIVED); | tcp_state_change(tp, TCPS_SYN_RECEIVED); | ||||
} | } | ||||
INP_WLOCK_ASSERT(tp->t_inpcb); | INP_WLOCK_ASSERT(tp->t_inpcb); | ||||
/* | /* | ||||
* Advance th->th_seq to correspond to first data byte. If data, | * Advance th->th_seq to correspond to first data byte. If data, | ||||
* trim to stay within window, dropping FIN if necessary. | * trim to stay within window, dropping FIN if necessary. | ||||
*/ | */ | ||||
th->th_seq++; | th->th_seq++; | ||||
▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, | ||||
if ((thflags & TH_ACK) == 0) { | if ((thflags & TH_ACK) == 0) { | ||||
if (IS_FASTOPEN(tp->t_flags)) { | if (IS_FASTOPEN(tp->t_flags)) { | ||||
rack_cc_conn_init(tp); | rack_cc_conn_init(tp); | ||||
} | } | ||||
return (rack_process_data(m, th, so, tp, drop_hdrlen, tlen, | return (rack_process_data(m, th, so, tp, drop_hdrlen, tlen, | ||||
tiwin, thflags, nxt_pkt)); | tiwin, thflags, nxt_pkt)); | ||||
} | } | ||||
KMOD_TCPSTAT_INC(tcps_connects); | KMOD_TCPSTAT_INC(tcps_connects); | ||||
if (tp->t_flags & TF_SONOTCONN) { | |||||
tp->t_flags &= ~TF_SONOTCONN; | |||||
soisconnected(so); | soisconnected(so); | ||||
} | |||||
/* Do window scaling? */ | /* Do window scaling? */ | ||||
if ((tp->t_flags & (TF_RCVD_SCALE | TF_REQ_SCALE)) == | if ((tp->t_flags & (TF_RCVD_SCALE | TF_REQ_SCALE)) == | ||||
(TF_RCVD_SCALE | TF_REQ_SCALE)) { | (TF_RCVD_SCALE | TF_REQ_SCALE)) { | ||||
tp->rcv_scale = tp->request_r_scale; | tp->rcv_scale = tp->request_r_scale; | ||||
} | } | ||||
/* | /* | ||||
* Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> | * Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> | ||||
* FIN-WAIT-1 | * FIN-WAIT-1 | ||||
▲ Show 20 Lines • Show All 9,421 Lines • Show Last 20 Lines |