buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27454, udp_input() source address save...

 
 

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

bug #27454: udp_input() source address save method cause recvfrom() source address error

Submitted by:  hanhui <hanhui03>
Submitted on:  Tue 15 Sep 2009 06:27:50 AM UTC  
 
Category: UDPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Duplicate
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Tue 15 Sep 2009 08:20:48 AM UTC, comment #2:

This is a duplicate to
bug #27252: Address pointer invalid after freeing pbuf in UDP receive callback
which is still in progress. The previous behaviour had problems, but by now, I favour it, too.

Simon Goldschmidt <goldsimon>
Project Administrator
Tue 15 Sep 2009 07:35:28 AM UTC, comment #1:

I think this was changed quite recently. I would favour restoring the previous behaviour where the pointer is direct into the packet buffer.

Kieran Mansley <kieranm>
Project Administrator
Tue 15 Sep 2009 06:27:50 AM UTC, original submission:

udp_input() use a local variable to save source address, and then post this variable's address into message box. if user thread priority lower than tcpip thread(), when udp_input() return, the local variable will be changed. then user netconn_recv() thread get this source address is error.

--------CODE-----------
if (pcb->recv != NULL) {
/* copy the source address to make it independent of the pbuf */
struct ip_addr src_addr = iphdr->src;
/* now the recv function is responsible for freeing p */
pcb->recv(pcb->recv_arg, pcb, p, &src_addr, src);
}
--------CODE-----------

hanhui <hanhui03>

 

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 kieranm (Posted a comment)
  • -unavailable- added by hanhui03 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Sep 2009 08:20:48 AM UTCgoldsimonOpen/ClosedOpen=>Closed
      StatusNone=>Duplicate

    Back to the top


    Powered by Savane 3.1-cleanup1