mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
Fixed bug #27215: TCP sent() callback gives leadin and trailing 1 byte len (SYN/FIN)
This commit is contained in:
parent
b4404ff0c8
commit
b7d7559cc9
@ -43,6 +43,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2009-10-18: Simon Goldschmidt
|
||||||
|
* tcp_in.c: Fixed bug #27215: TCP sent() callback gives leadin and
|
||||||
|
trailing 1 byte len (SYN/FIN)
|
||||||
|
|
||||||
2009-10-16: Simon Goldschmidt
|
2009-10-16: Simon Goldschmidt
|
||||||
* tcp_out.c: Fixed bug #27315: zero window probe and FIN
|
* tcp_out.c: Fixed bug #27315: zero window probe and FIN
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
struct tcp_pcb_listen *lpcb;
|
struct tcp_pcb_listen *lpcb;
|
||||||
u8_t hdrlen;
|
u8_t hdrlen;
|
||||||
err_t err;
|
err_t err;
|
||||||
|
u8_t old_state;
|
||||||
|
|
||||||
PERF_START;
|
PERF_START;
|
||||||
|
|
||||||
@ -288,7 +289,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
old_state = pcb->state;
|
||||||
tcp_input_pcb = pcb;
|
tcp_input_pcb = pcb;
|
||||||
err = tcp_process(pcb);
|
err = tcp_process(pcb);
|
||||||
tcp_input_pcb = NULL;
|
tcp_input_pcb = NULL;
|
||||||
@ -314,7 +315,11 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
called when new send buffer space is available, we call it
|
called when new send buffer space is available, we call it
|
||||||
now. */
|
now. */
|
||||||
if (pcb->acked > 0) {
|
if (pcb->acked > 0) {
|
||||||
TCP_EVENT_SENT(pcb, pcb->acked, err);
|
/* Prevent ACK for SYN or FIN to generate a sent event */
|
||||||
|
if ((pcb->acked != 1) || ((old_state != SYN_RCVD) &&
|
||||||
|
(pcb->state != FIN_WAIT_2) && (pcb->state != TIME_WAIT))) {
|
||||||
|
TCP_EVENT_SENT(pcb, pcb->acked, err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recv_data != NULL) {
|
if (recv_data != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user