lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Connection closing. Packets getting routed to wrong pcb


From: wurzel
Subject: Re: [lwip-users] Connection closing. Packets getting routed to wrong pcb?
Date: Wed, 27 Apr 2011 14:39:18 -0700

Hi again. After further testing/research I think I've found the issue.

http://savannah.nongnu.org/bugs/?func=detailitem&item_id=28945

This issue regards the "tcp_accepted" call and I did exactly what
the bug warns against:
"most people might try to call tcp_accepted() on the connection-pcb 
 passed to the accept callback."

I'm using version 1.3.2 which was before the bug above added an
assert() to make sure people don't do what I did. 

However, it appears that even in v1.4.0rc2 rawapi.txt, the description
of tcp_accepted is still as follows:
------------------------------------------------------------
- void tcp_accepted(struct tcp_pcb *pcb)

  Inform lwIP that an incoming connection has been accepted. This would
  usually be called from the accept callback. This allows lwIP to perform
  housekeeping tasks, such as allowing further incoming connections to be
  queued in the listen backlog.
-------------------------------------------------------------

A simple note here mentioning that this must be called on the "parent"
listening socket would be extremely helpful.  Based on the description
above, I think most people would tend to call it on the pcb passed to
the callback.

                                                                -w






reply via email to

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