Browse Source

Fixed bug #26236: "TCP options (timestamp) don't work with no-copy-tcpwrite": deallocate option data, only concat segments with same flags

STABLE-2_1_x
goldsimon 17 years ago
parent
commit
ed65d9cd75
  1. 4
      CHANGELOG
  2. 6
      src/core/tcp_out.c

4
CHANGELOG

@ -83,6 +83,10 @@ HISTORY
++ Bugfixes:
2009-04-19 Simon Goldschmidt
* tcp_out.c: Fixed bug #26236: "TCP options (timestamp) don't work with
no-copy-tcpwrite": deallocate option data, only concat segments with same flags
2009-04-19 Simon Goldschmidt
* tcp_out.c: Fixed bug #25094: "Zero-length pbuf" (options are now allocated
in the header pbuf, not the data pbuf)

6
src/core/tcp_out.c

@ -344,9 +344,11 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
!(TCPH_FLAGS(useg->tcphdr) & (TCP_SYN | TCP_FIN)) &&
!(flags & (TCP_SYN | TCP_FIN)) &&
/* fit within max seg size */
useg->len + queue->len <= pcb->mss) {
(useg->len + queue->len <= pcb->mss) &&
/* only concatenate segments with the same options */
(useg->flags == queue->flags)) {
/* Remove TCP header from first segment of our to-be-queued list */
if(pbuf_header(queue->p, -TCP_HLEN)) {
if(pbuf_header(queue->p, -(TCP_HLEN + optlen))) {
/* Can we cope with this failing? Just assert for now */
LWIP_ASSERT("pbuf_header failed\n", 0);
TCP_STATS_INC(tcp.err);

Loading…
Cancel
Save