buglwIP - A Lightweight TCP/IP stack - Bugs: bug #46338, UDP netconns block after fatal...

 
 

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

bug #46338: UDP netconns block after fatal error

Submitter:  Ivan Delamer <idelamer>
Submitted:  Fri 30 Oct 2015 04:15:06 PM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Tue 08 Mar 2016 08:05:17 PM UTC, comment #4: 

Fixed ERR_IS_FATAL, too

Simon Goldschmidt <goldsimon>
Group administrator
Mon 07 Mar 2016 08:34:04 PM UTC, comment #3: 

Right. I hate this macro. I keep forgettong it when changing the error numbers...

Thanks for the reminder.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 07 Mar 2016 08:22:58 PM UTC, comment #2: 

Shouldn't the ERR_IS_FATAL macro be adjusted as well then?

Jakob Haufe <sur5r>
Sat 05 Mar 2016 03:16:04 PM UTC, comment #1: 

Fixed by making ERR_IF non-fatal. I don't know why it was.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 30 Oct 2015 04:15:06 PM UTC, original submission:  

Netconns remember the last error. If last error was fatal, subsequent calls to send/recv/etc return with the same error.

I've been in the situation where the netif returns ERR_IF, e.g. when there is a buffer error, or cable is disconnected, etc. I know probably there should be ERR_MEM, or netif should be set to down. But sometimes this error comes before netif is set down.

ERR_IF is a fatal error. Makes sense perhaps for TCP netconn to kill the connection. But for UDP, where maybe we're listening on multiple netifs, this kills the netconn indefinitely.

Possible fixes:
- Make ERR_IF non-fatal
- Check for fatal last_err only for TCP PCBs
- Specify that ERR_IF is for permanent netif errors (not likely, most are temporary...)

Ivan Delamer <idelamer>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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 sur5r (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by idelamer (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-08 goldsimon StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2016-03-07 goldsimon StatusFixed In Progress
        Open/ClosedClosed Open
    2016-03-05 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code