mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
tcp_connect: send timestamp-option only if (pcb->flags & TF_TIMESTAMP) != NULL (same as for passive open)
This commit is contained in:
parent
2b1c389955
commit
103b5a760f
@ -658,11 +658,13 @@ tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port,
|
|||||||
pcb->connected = connected;
|
pcb->connected = connected;
|
||||||
#endif /* LWIP_CALLBACK_API */
|
#endif /* LWIP_CALLBACK_API */
|
||||||
|
|
||||||
|
/* Send a SYN together with the MSS option. */
|
||||||
ret = tcp_enqueue(pcb, NULL, 0, TCP_SYN, 0, TF_SEG_OPTS_MSS
|
ret = tcp_enqueue(pcb, NULL, 0, TCP_SYN, 0, TF_SEG_OPTS_MSS
|
||||||
#if LWIP_TCP_TIMESTAMPS
|
#if LWIP_TCP_TIMESTAMPS
|
||||||
| TF_SEG_OPTS_TS
|
/* and maybe include the TIMESTAMP option */
|
||||||
#endif
|
| (pcb->flags & TF_TIMESTAMP ? TF_SEG_OPTS_TS : 0)
|
||||||
);
|
#endif /* LWIP_TCP_TIMESTAMPS */
|
||||||
|
);
|
||||||
if (ret == ERR_OK) {
|
if (ret == ERR_OK) {
|
||||||
/* SYN segment was enqueued, changed the pcbs state now */
|
/* SYN segment was enqueued, changed the pcbs state now */
|
||||||
pcb->state = SYN_SENT;
|
pcb->state = SYN_SENT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user