buglwIP - A Lightweight TCP/IP stack - Bugs: bug #47154, lwip_netconn_do_writemore doesn't...

 
 

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

bug #47154: lwip_netconn_do_writemore doesn't clear conn->write_offset on fatal/routing error.

Submitted by:  Marco Veeneman <mave>
Submitted on:  Mon 15 Feb 2016 12:53:49 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Thu 18 Feb 2016 06:48:33 PM UTC, comment #2:

Fixed (slightly different than in the patch). Thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 15 Feb 2016 01:00:30 PM UTC, comment #1:

Sorry, I forgot to mention the location of the assert. It it in api_msg.c, lwip_netconn_do_delconn(), line 1029.

Marco Veeneman <mave>
Mon 15 Feb 2016 12:53:49 PM UTC, original submission:

lwip_netconn_do_writemore is setting conn->write_offset to 0 on success and returns to the application thread when finished. This works fine if no fatal/routing error occurs.
If a fatal/routing error happens, conn->write_offset is not cleared which causes the following assert when trying to close the socket after a fatal/routing error occurs:

LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL &&
msg->conn->write_offset == 0);

On a fatal/routing error conn->write_offset should be set to 0.

Marco Veeneman <mave>

 

Attached Files
file #36342:  api_msg.patch added by mave (882B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by mave (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 18 Feb 2016 06:48:33 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Mon 15 Feb 2016 12:53:49 PM UTCmaveAttached File-=>Added api_msg.patch, #36342

    Back to the top


    Powered by Savane 3.1-cleanup1