tasklwIP - A Lightweight TCP/IP stack - Tasks: task #14275, sockets should only keep...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #14275: sockets should only keep asynchronous errors for sock->err

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Thu 15 Dec 2016 09:11:31 PM UTC  
 
Category:  None Should Start On:  Thu 15 Dec 2016 12:00:00 AM UTC
Should be Finished on:  Thu 15 Dec 2016 12:00:00 AM UTC Priority:  5 - Normal
Status:  Done Privacy:  Public
Percent Complete:  100% Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  None
Effort:  0.00

Wed 12 Apr 2017 10:42:44 AM UTC, comment #3: 
Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 07 Mar 2017 08:56:43 PM UTC, comment #2: 

To sum it up, sock_set_errno() should only be called for some errors listed below (although I don't see why some of them are asynchronous, maybe for nonblocking sockets).

I guess that could mean we set sock->err only from tcpip_thread callbacks...

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 07 Mar 2017 08:53:58 PM UTC, comment #1: 

2.10.10 Pending Error

Errors may occur asynchronously, and be reported to the socket in response to input from the network protocol. The socket stores the pending error to be reported to a user of the socket at the next opportunity. The error is returned in response to a subsequent send(), recv(), or getsockopt() operation on the socket, and the pending error is then cleared.

2.10.15 Asynchronous Errors

If any of the following conditions occur asynchronously for a socket, the corresponding value listed below shall become the pending error for the socket:

ECONNABORTED, ECONNREFUSED, ECONNRESET, EHOSTDOWN, EHOSTUNREACH, EMSGSIZE, ENETDOWN, ENETRESET, ENETUNREACH

2.10.16 Use of Options

The SO_ERROR option is used only on getsockopt(). When this option is specified, getsockopt() shall return any pending error on the socket and clear the error status. It shall return a value of 0 if there is no pending error. SO_ERROR may be used to check for asynchronous errors on connected connectionless-mode sockets or for other types of asynchronous errors. SO_ERROR has no default value.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 15 Dec 2016 09:11:31 PM UTC, original submission:  

From bug #49848: "see sections 2.10.10, 2.10.15, and 2.10.16 of http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html"

-> ensure only such asynchronous errors are store at socket level
(netconn level has task #13922: Remove fatal error handling for this)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-12 goldsimon StatusNone => Done
        Percent Complete0% => 100%
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5