Changeset View
Changeset View
Standalone View
Standalone View
head/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 5,427 Lines • ▼ Show 20 Lines | rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && | if ((to->to_flags & TOF_TS) != 0 && | ||||
SEQ_LEQ(th->th_seq, tp->last_ack_sent) && | SEQ_LEQ(th->th_seq, tp->last_ack_sent) && | ||||
SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + | SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + | ||||
((thflags & (TH_SYN | TH_FIN)) != 0))) { | ((thflags & (TH_SYN | TH_FIN)) != 0))) { | ||||
tp->ts_recent_age = tcp_ts_getticks(); | tp->ts_recent_age = tcp_ts_getticks(); | ||||
tp->ts_recent = to->to_tsval; | tp->ts_recent = to->to_tsval; | ||||
} | } | ||||
tp->snd_wnd = tiwin; | |||||
/* | /* | ||||
* If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN flag | * If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN flag | ||||
* is on (half-synchronized state), then queue data for later | * is on (half-synchronized state), then queue data for later | ||||
* processing; else drop segment and return. | * processing; else drop segment and return. | ||||
*/ | */ | ||||
if ((thflags & TH_ACK) == 0) { | if ((thflags & TH_ACK) == 0) { | ||||
if (IS_FASTOPEN(tp->t_flags)) { | if (IS_FASTOPEN(tp->t_flags)) { | ||||
tp->snd_wnd = tiwin; | |||||
cc_conn_init(tp); | 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)); | ||||
} | } | ||||
TCPSTAT_INC(tcps_connects); | TCPSTAT_INC(tcps_connects); | ||||
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; | ||||
tp->snd_wnd = tiwin; | |||||
} | } | ||||
/* | /* | ||||
* Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> | * Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> | ||||
* FIN-WAIT-1 | * FIN-WAIT-1 | ||||
*/ | */ | ||||
tp->t_starttime = ticks; | tp->t_starttime = ticks; | ||||
if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { | if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { | ||||
tcp_fastopen_decrement_counter(tp->t_tfo_pending); | tcp_fastopen_decrement_counter(tp->t_tfo_pending); | ||||
▲ Show 20 Lines • Show All 3,695 Lines • Show Last 20 Lines |