TCP/IP stack

esch_esp
Posts: 7
Joined: Mon May 08, 2017 8:54 am

TCP/IP stack

Postby esch_esp » Mon May 08, 2017 9:27 am

Hello,
After experiencing unreliable TCP access (esp-idf 2.0), checking the code there seem to be some
inconsistency.

lwip/opt.h: here we define
#define TCP_LISTEN_BACKLOG 1

in tcp.c:
void tcp_pcb_purge(struct tcp_pcb *pcb)
.......
if (pcb->state == SYN_RCVD)
...

in tcp_in.c:
static err_t tcp_process(struct tcp_pcb *pcb)
....
switch (pcb->state) {
.....
case SYN_RCVD:
.... no call to tcp_pcb_purge at all !?

case FIN_WAIT_1:
tcp_pcb_purge(pcb);
case FIN_WAIT_2:
tcp_pcb_purge(pcb);
.....


A workaround is to set TCP_LISTEN_BACKLOG 0

Thanks

ScottEsp
Posts: 1
Joined: Thu Jan 25, 2018 3:41 pm

Re: TCP/IP stack

Postby ScottEsp » Thu Jan 25, 2018 3:43 pm

Any update on how this worked out for you?

Who is online

Users browsing this forum: No registered users and 73 guests