From dccad08508c045af7c4f2600db7a3138b7c8fdb5 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Sun, 11 Sep 2011 13:13:26 +0200 Subject: [PATCH] use pcb->mss instead of TCP_MSS for preallocate mss-sized pbufs (bug #34019) --- CHANGELOG | 4 ++++ src/core/tcp_out.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index aa47e307..dc14b71a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -52,6 +52,10 @@ HISTORY ++ Bugfixes: + 2011-09-11: Simon Goldschmidt + * tcp_out.c: use pcb->mss instead of TCP_MSS for preallocate mss-sized pbufs + (bug #34019) + 2011-09-09: Simon Goldschmidt * udp.c: fixed bug #34072: UDP broadcast is received from wrong UDP pcb if udp port matches diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index db9e1157..2b1319c5 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -232,7 +232,7 @@ tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); /* always create MSS-sized pbufs */ - alloc = TCP_MSS; + alloc = pcb->mss; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { /* Should we allocate an oversized pbuf, or just the minimum