buglwIP - A Lightweight TCP/IP stack - Bugs: bug #47260, Implementation bugs in...

 
 

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

bug #47260: Implementation bugs in LWIP_FIONREAD_LINUXMODE for UDP

Submitter:  Joel Cunningham <jcunningham>
Submitted:  Thu 25 Feb 2016 07:00:55 PM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  jcunningham
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Thu 25 Feb 2016 09:07:06 PM UTC, comment #3: 

Submitted in 2a8398dfb8a07c0f9fda41411954904e0cd9df21

Joel Cunningham <jcunningham>
Group Member
Thu 25 Feb 2016 08:53:12 PM UTC, comment #2: 

I guess nobody was using the feature.  I'll submit the patch

Joel Cunningham <jcunningham>
Group Member
Thu 25 Feb 2016 08:22:19 PM UTC, comment #1: 

Good fix. How come this is in there for so long?

Simon Goldschmidt <goldsimon>
Group administrator
Thu 25 Feb 2016 07:00:55 PM UTC, original submission:  

The UDP support with LWIP_FIONREAD_LINUXMODE set to 1 has a couple of bugs in the implementation:

1) if sock->lastdata is not NULL, the output pointer of FIONREAD is not set
2) argp is being cast to u16_t * even though the other FIONREAD code uses a int.  Linux code uses an int
3) sock->lastoffset was not set even though we are setting sock->lastdata.  This could cause a problem on the next recv() call

1) was discovered when calling ioctl() twice in a row without a recv() in between

The attached patch fixes these issues

Joel Cunningham <jcunningham>
Group Member

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jcunningham (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-25 jcunningham StatusNone Fixed
        Open/ClosedOpen Closed
    2016-02-25 jcunningham Assigned toNone jcunningham
    2016-02-25 jcunningham Attached File- Added 0001-Fix-bug-in-FIONREAD-handling-in-LINUXMODE.patch, #36459

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code