[Top][All Lists]

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

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

From: Valery Ushakov
Subject: Re: [lwip-users] Sequence bug in core/tcp.c
Date: Thu, 25 Jul 2013 16:21:29 +0000 (UTC)
User-agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (NetBSD/6.1_RC1 (macppc))

Joe Gorse <address@hidden> wrote:

> 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.

You are not supposed to call tcp_listen twice on the same pcb, so
everyone "get it to work at all" by not doing that :)


reply via email to

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