mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Compare commits
2 Commits
a9147bb332
...
a459b21dfa
Author | SHA1 | Date | |
---|---|---|---|
|
a459b21dfa | ||
|
5171345eb8 |
@ -1993,17 +1993,17 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* TCP timestamp option with valid length */
|
/* TCP timestamp option with valid length */
|
||||||
tsval = tcp_get_next_optbyte();
|
tsval = (tcp_get_next_optbyte() << 24);
|
||||||
tsval |= (tcp_get_next_optbyte() << 8);
|
|
||||||
tsval |= (tcp_get_next_optbyte() << 16);
|
tsval |= (tcp_get_next_optbyte() << 16);
|
||||||
tsval |= (tcp_get_next_optbyte() << 24);
|
tsval |= (tcp_get_next_optbyte() << 8);
|
||||||
|
tsval |= tcp_get_next_optbyte();
|
||||||
if (flags & TCP_SYN) {
|
if (flags & TCP_SYN) {
|
||||||
pcb->ts_recent = lwip_ntohl(tsval);
|
pcb->ts_recent = tsval;
|
||||||
/* Enable sending timestamps in every segment now that we know
|
/* Enable sending timestamps in every segment now that we know
|
||||||
the remote host supports it. */
|
the remote host supports it. */
|
||||||
tcp_set_flags(pcb, TF_TIMESTAMP);
|
tcp_set_flags(pcb, TF_TIMESTAMP);
|
||||||
} else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) {
|
} else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) {
|
||||||
pcb->ts_recent = lwip_ntohl(tsval);
|
pcb->ts_recent = tsval;
|
||||||
}
|
}
|
||||||
/* Advance to next option (6 bytes already read) */
|
/* Advance to next option (6 bytes already read) */
|
||||||
tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6;
|
tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6;
|
||||||
|
Loading…
Reference in New Issue
Block a user