[Top][All Lists]

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

[lwip-devel] [bug #21656] recvmbox problem in netconn API (netconn_recv

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #21656] recvmbox problem in netconn API (netconn_recv and others)
Date: Tue, 27 Nov 2007 21:27:59 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20071025 Firefox/


                 Summary: recvmbox problem in netconn API (netconn_recv and
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Dienstag 27.11.2007 um 21:27
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



The recvmbox of a netconn is allocated in:

- netconn_bind (only for UDP/RAW)
- netconn_connect
- netconn_recv

So I think there is a problem here: When creating a UDP or RAW netconn that
doesn't bind or connect but implicitly sends using sendto and gets an answer
for that, the recvmbox is effectively only allocated in netconn_recv. If
netconn_recv is called too late, recvmbox is NULL in api_msg.c:recv_udp() and
the received data is simply thrown away.

Therefore, I would suggest always allocating a recvmbox (in
netconn_new_with....) and freeing this mbox when allocating an acceptmbox for
TCP listen netconns in api_msg.c:do_listen().


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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