tcp: improve behaviour when using TCP_NOOPT
Use ISS for SEG.SEQ when sending a SYN-ACK segment in response to an SYN segment received in the SYN-SENT state on a socket having the IPPROTO_TCP level socket option TCP_NOOPT enabled. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D28656
This commit is contained in:
parent
1bd44b11e5
commit
ed782b9f5a
@ -785,6 +785,10 @@ send:
|
||||
#endif
|
||||
hdrlen = sizeof (struct tcpiphdr);
|
||||
|
||||
if (flags & TH_SYN) {
|
||||
tp->snd_nxt = tp->iss;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute options for segment.
|
||||
* We only have to care about SYN and established connection
|
||||
@ -795,7 +799,6 @@ send:
|
||||
if ((tp->t_flags & TF_NOOPT) == 0) {
|
||||
/* Maximum segment size. */
|
||||
if (flags & TH_SYN) {
|
||||
tp->snd_nxt = tp->iss;
|
||||
to.to_mss = tcp_mssopt(&tp->t_inpcb->inp_inc);
|
||||
to.to_flags |= TOF_MSS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user