lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5958] netconn_listen & netconn_accept error handlin


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5958] netconn_listen & netconn_accept error handling
Date: Wed, 23 May 2007 09:21:13 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

URL:
  <http://savannah.nongnu.org/patch/?5958>

                 Summary: netconn_listen & netconn_accept error handling
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: mercredi 23.05.2007 à 11:21
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

if your call netconn_accept without any previous netconn_listen call, the
acceptmbox is not valide, and you can have an error (consequence is "port
dependant"). I propose to add a simple guard inside netconn_accept:

if (conn->acceptmbox == SYS_MBOX_NULL) {
  return ERR_VAL;
}

For "listen", the code to allocate the acceptmbox is done inside
netconn_listen AND inside do_listen. I propose to remove the code inside
netconn_listen, because there is a better error handling in do_listen
(netconn type check, check tcp_listen return values...)





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5958>

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





reply via email to

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