mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-18 20:10:53 +00: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:
|
||||
|
||||
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
|
||||
* 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;
|
||||
u8_t hdrlen;
|
||||
err_t err;
|
||||
u8_t old_state;
|
||||
|
||||
PERF_START;
|
||||
|
||||
@ -288,7 +289,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
old_state = pcb->state;
|
||||
tcp_input_pcb = pcb;
|
||||
err = tcp_process(pcb);
|
||||
tcp_input_pcb = NULL;
|
||||
@ -314,8 +315,12 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
called when new send buffer space is available, we call it
|
||||
now. */
|
||||
if (pcb->acked > 0) {
|
||||
/* 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(flags & TCP_PSH) {
|
||||
|
Loading…
Reference in New Issue
Block a user