buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52471, Change in netconn_recv_data_tcp...

 
 

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

bug #52471: Change in netconn_recv_data_tcp causing recv regression

Submitted by:  Joel Cunningham <jcunningham>
Submitted on:  Mon 20 Nov 2017 07:45:09 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: OpenPlanned Release: 2.1.0
lwIP version: git head

Tue 21 Nov 2017 07:25:07 PM UTC, comment #5:

I'll reopen this to keep it as a reminder this has to be fixed.
Also the unit test needs to be re-enabeld.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 20 Nov 2017 08:36:40 PM UTC, comment #4:

Yes. Thanks.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 20 Nov 2017 08:22:19 PM UTC, comment #3:

I also had to disable the unit tests that checked for an error after receiving remote closure (0) from recv()

Joel Cunningham <jcunningham>
Project Member
Mon 20 Nov 2017 07:56:36 PM UTC, comment #2:

Reverted in ebcae98ae65c26a0c210c802540bf027d07fe2f1

Joel Cunningham <jcunningham>
Project Member
Mon 20 Nov 2017 07:47:14 PM UTC, comment #1:

Ooops! Could you please just revert that commit? I don't have access to git right now. I'll rework that patch later then.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 20 Nov 2017 07:45:09 PM UTC, original submission:

Found this after pulling up to include db3a4e31586f8614b0a27b482406b0c212a4e08a, but recv no longer returns 0 during a remote closure, instead it returns ENOTCONN.

I did a little debugging and what's happening is that in my application, it reads the last pbuf from recvmbox, but calls netconn_recv_data_tcp() (from lwip_recv_tcp) again since there is more buffer space. This processes the close message, deallocates the recvmbox (via netconn_close_shutdown) and returns ERR_CLSD back to lwip_recv_tcp, but since we did successfully read data during this call, the 0 return is lost. Then during the next call to recv(), we hit the case modified in db3a4e3 and now return ERR_CONN

Joel Cunningham <jcunningham>
Project Member

 

No files currently attached

 

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 jcunningham (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Nov 2017 07:25:07 PM UTCgoldsimonAssigned tojcunningham=>goldsimon
      Open/ClosedClosed=>Open
      Planned ReleaseNone=>2.1.0
    Mon 20 Nov 2017 07:56:36 PM UTCjcunninghamStatusNone=>Fixed
      Assigned toNone=>jcunningham
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1