lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/p


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/port connection state
Date: Wed, 21 Mar 2007 09:25:11 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Follow-up Comment #7, bug #19162 (project lwip):

lwip_sendto()? Uhmm, I don't like lwip_sendto() implementation, but remove
would be the only solution? :)

I don't like it because it's not efficient : 3 messages exchange between api
& tcpip_thread, for netconn_connect, lwip_send, &
netconn_connect/netconn_disconnect.

Each time : 1 alloc(tcpip_apimsg)/1 free(tcpip_thread), 2 post+fetch
(tcpip_apimsg post, tcpip_thread fetch, tcpip_thread post, tcpip_apimsh
fetch)...

alloc/free cause potential problems (same memp's pool is use by the driver &
by api_lib, if you receive lot of packets, you can fall in a "not enough
memory" problem, and, most of time, lwIP doesn't like that).

My solution: add a do_sendto in api_msg and do the process in tcpip_thread
context, in a atomic way. With this solution, two problems can be solved
(Bryan & Rob), and sendto will be faster.

I can propose a patch if you want (I just terminate a mail about another
bug). Good for you Kieran?





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19162>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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