Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_output.c
Show First 20 Lines • Show All 779 Lines • ▼ Show 20 Lines | send: | ||||
optlen = 0; | optlen = 0; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (isipv6) | if (isipv6) | ||||
hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); | hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); | ||||
else | else | ||||
#endif | #endif | ||||
hdrlen = sizeof (struct tcpiphdr); | hdrlen = sizeof (struct tcpiphdr); | ||||
if (flags & TH_SYN) { | |||||
tp->snd_nxt = tp->iss; | |||||
} | |||||
/* | /* | ||||
* Compute options for segment. | * Compute options for segment. | ||||
* We only have to care about SYN and established connection | * We only have to care about SYN and established connection | ||||
* segments. Options for SYN-ACK segments are handled in TCP | * segments. Options for SYN-ACK segments are handled in TCP | ||||
* syncache. | * syncache. | ||||
*/ | */ | ||||
to.to_flags = 0; | to.to_flags = 0; | ||||
if ((tp->t_flags & TF_NOOPT) == 0) { | if ((tp->t_flags & TF_NOOPT) == 0) { | ||||
/* Maximum segment size. */ | /* Maximum segment size. */ | ||||
if (flags & TH_SYN) { | if (flags & TH_SYN) { | ||||
tp->snd_nxt = tp->iss; | |||||
to.to_mss = tcp_mssopt(&tp->t_inpcb->inp_inc); | to.to_mss = tcp_mssopt(&tp->t_inpcb->inp_inc); | ||||
to.to_flags |= TOF_MSS; | to.to_flags |= TOF_MSS; | ||||
/* | /* | ||||
* On SYN or SYN|ACK transmits on TFO connections, | * On SYN or SYN|ACK transmits on TFO connections, | ||||
* only include the TFO option if it is not a | * only include the TFO option if it is not a | ||||
* retransmit, as the presence of the TFO option may | * retransmit, as the presence of the TFO option may | ||||
* have caused the original SYN or SYN|ACK to have | * have caused the original SYN or SYN|ACK to have | ||||
▲ Show 20 Lines • Show All 1,315 Lines • Show Last 20 Lines |