mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
Sending TCP timestamp option in SYN packets
TCP timestamps were only sent if the remote side requested it first. This enables the use of timestamps for outgoing connections as well. Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
faf74b36a4
commit
112e370457
@ -835,9 +835,9 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
|
||||
#endif /* LWIP_WND_SCALE */
|
||||
}
|
||||
#if LWIP_TCP_TIMESTAMPS
|
||||
if ((pcb->flags & TF_TIMESTAMP)) {
|
||||
/* Make sure the timestamp option is only included in data segments if we
|
||||
agreed about it with the remote host. */
|
||||
if ((pcb->flags & TF_TIMESTAMP) || ((flags & TCP_SYN) && (pcb->state != SYN_RCVD))) {
|
||||
/* The timestamp option is only included in SYN packets,
|
||||
* and in data segments if we agreed about it with the remote host. */
|
||||
optflags |= TF_SEG_OPTS_TS;
|
||||
}
|
||||
#endif /* LWIP_TCP_TIMESTAMPS */
|
||||
|
Loading…
Reference in New Issue
Block a user