mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
fixed bug #34426: tcp_zero_window_probe() transmits incorrect byte value when pcb->unacked != NULL
This commit is contained in:
parent
277c7aa518
commit
56cee6b4d8
@ -49,6 +49,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2011-10-09: Simon Goldschmidt
|
||||
* tcp_out.c: fixed bug #34426: tcp_zero_window_probe() transmits incorrect
|
||||
byte value when pcb->unacked != NULL
|
||||
|
||||
2011-10-09: Simon Goldschmidt
|
||||
* ip4.c: fixed bug #34447 LWIP_IP_ACCEPT_UDP_PORT(dst_port) wrong
|
||||
|
||||
|
@ -1453,9 +1453,11 @@ tcp_zero_window_probe(struct tcp_pcb *pcb)
|
||||
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
|
||||
} else {
|
||||
/* Data segment, copy in one byte from the head of the unacked queue */
|
||||
struct tcp_hdr *thdr = (struct tcp_hdr *)seg->p->payload;
|
||||
char *d = ((char *)p->payload + TCP_HLEN);
|
||||
pbuf_copy_partial(seg->p, d, 1, TCPH_HDRLEN(thdr) * 4);
|
||||
/* Depending on whether the segment has already been sent (unacked) or not
|
||||
(unsent), seg->p->payload points to the IP header or TCP header.
|
||||
Ensure we copy the first TCP data byte: */
|
||||
pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
|
||||
}
|
||||
|
||||
#if CHECKSUM_GEN_TCP
|
||||
|
Loading…
Reference in New Issue
Block a user