buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27345, ip_frag() does not use the...

 
 

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

bug #27345: ip_frag() does not use the LWIP_NETIF_LOOPBACK function

Submitted by:  hanhui <hanhui03>
Submitted on:  Sat 29 Aug 2009 01:54:13 PM UTC  
 
Category: IPv4Severity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sun 30 Aug 2009 08:52:55 PM UTC, comment #1:

I moved the check for loop before the call to ip_frag() in ip_output_if(). That also solves this problem and does not have the overhead of calling into the fragmentation code.

Thanks for reporting!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sat 29 Aug 2009 01:54:13 PM UTC, original submission:

If a packet's destination address are same as netif that send this packet(source address == destination address),
ip_frag() dose not use netif_loop_output() to send this packet.

---------CODE---------
netif->output(netif, header, dest);
---------CODE---------

Should be replaced by:

---------CODE---------
#if (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
if (ip_addr_cmp(dest, &netif->ip_addr)) {
netif_loop_output(netif, p, dest);
} else
#endif /* (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) */
{
netif->output(netif, header, dest);
}
---------CODE---------

hanhui <hanhui03>

 

Attached Files
file #18657:  ip_frag.c added by hanhui03 (27KiB - 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 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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 30 Aug 2009 08:52:55 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Sat 29 Aug 2009 01:54:14 PM UTChanhui03Attached File-=>Added ip_frag.c, #18657

    Back to the top


    Powered by Savane 3.1-cleanup1