mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
fixed bug #34587: TCP_BUILD_MSS_OPTION doesn't consider netif->mtu, causes slow network
This commit is contained in:
parent
9621ccb712
commit
d96703bba3
@ -49,6 +49,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2011-10-18: Simon Goldschmidt
|
||||||
|
* tcp_impl.h, tcp_out.c: fixed bug #34587: TCP_BUILD_MSS_OPTION doesn't
|
||||||
|
consider netif->mtu, causes slow network
|
||||||
|
|
||||||
2011-10-18: Simon Goldschmidt
|
2011-10-18: Simon Goldschmidt
|
||||||
* sockets.c: fixed bug #34581 missing parentheses in udplite sockets code
|
* sockets.c: fixed bug #34581 missing parentheses in udplite sockets code
|
||||||
|
|
||||||
|
@ -1065,7 +1065,7 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
|
|||||||
//LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0);
|
//LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0);
|
||||||
opts = (u32_t *)(void *)(seg->tcphdr + 1);
|
opts = (u32_t *)(void *)(seg->tcphdr + 1);
|
||||||
if (seg->flags & TF_SEG_OPTS_MSS) {
|
if (seg->flags & TF_SEG_OPTS_MSS) {
|
||||||
TCP_BUILD_MSS_OPTION(*opts);
|
*opts = TCP_BUILD_MSS_OPTION(pcb->mss);
|
||||||
opts += 1;
|
opts += 1;
|
||||||
}
|
}
|
||||||
#if LWIP_TCP_TIMESTAMPS
|
#if LWIP_TCP_TIMESTAMPS
|
||||||
|
@ -301,10 +301,7 @@ struct tcp_seg {
|
|||||||
(flags & TF_SEG_OPTS_TS ? 12 : 0)
|
(flags & TF_SEG_OPTS_TS ? 12 : 0)
|
||||||
|
|
||||||
/** This returns a TCP header option for MSS in an u32_t */
|
/** This returns a TCP header option for MSS in an u32_t */
|
||||||
#define TCP_BUILD_MSS_OPTION(x) (x) = PP_HTONL(((u32_t)2 << 24) | \
|
#define TCP_BUILD_MSS_OPTION(mss) htonl(0x02040000 | ((mss) & 0xFFFF))
|
||||||
((u32_t)4 << 16) | \
|
|
||||||
(((u32_t)TCP_MSS / 256) << 8) | \
|
|
||||||
(TCP_MSS & 255))
|
|
||||||
|
|
||||||
/* Global variables: */
|
/* Global variables: */
|
||||||
extern struct tcp_pcb *tcp_input_pcb;
|
extern struct tcp_pcb *tcp_input_pcb;
|
||||||
|
Loading…
Reference in New Issue
Block a user