Fixed bug #21491: The MSS option sent (with SYN) is now based on TCP_MSS instead of pcb->mss (on passive open now effectively sending our configured TCP_MSS instead of the one received).

This commit is contained in:
goldsimon
2007-11-01 16:23:32 +00:00
parent 853765954e
commit 298d5cf042
4 changed files with 15 additions and 10 deletions

View File

@@ -122,7 +122,11 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
(((tpcb)->unsent != NULL) && ((tpcb)->unsent->next != NULL))) ? \
tcp_output(tpcb) : ERR_OK)
/** This returns a TCP header option for MSS in an u32_t */
#define TCP_BUILD_MSS_OPTION() htonl(((u32_t)2 << 24) | \
((u32_t)4 << 16) | \
(((u32_t)TCP_MSS / 256) << 8) | \
(TCP_MSS & 255))
#define TCP_SEQ_LT(a,b) ((s32_t)((a)-(b)) < 0)
#define TCP_SEQ_LEQ(a,b) ((s32_t)((a)-(b)) <= 0)