[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Sequence bug in core/tcp.c

From: Joe Gorse
Subject: [lwip-users] Sequence bug in core/tcp.c
Date: Wed, 24 Jul 2013 21:43:43 -0400

To whom it concerns:

Around line 524 of core/tcp.c, in tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog):

  LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL);

  /* already listening? */
  if (pcb->state == LISTEN) {
    return pcb;

A pcb->state == LISTEN never makes it past the LWIP_ERROR. Put the check for the LISTEN state above the LWIP_ERROR.

I am surprised anyone gets tcp_listen() to work at all for the raw API with this bug.

Joe Gorse

C: 440-552-0730
LI: Joe Gorse
FB: jhgiv

reply via email to

[Prev in Thread] Current Thread [Next in Thread]