buglwIP - A Lightweight TCP/IP stack - Bugs: bug #39225, udp.c uses...

 
 

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

bug #39225: udp.c uses netif_matches_ip6_addr() incorrectly

Submitted by:  Valery Ushakov <uwe>
Submitted on:  Tue 11 Jun 2013 12:02:05 AM UTC  
 
Category: UDPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Tue 25 Feb 2014 09:31:27 PM UTC, comment #2:

Both fixed the usage in udp.c and the function name (renamed to netif_get_ip6_addr_match). Thanks for the report.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 28 Jun 2013 08:15:54 PM UTC, comment #1:

> The "matches" part of the name is confusing. It suggests boolean return value, so it's
> probably better to rename it to reflect that it returns an index.


ACK

But at least, the usage should be fixed.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 11 Jun 2013 12:02:05 AM UTC, original submission:

netif_matches_ip6_addr() returns slot index (can be 0) on match, -1 if no match found.

udp_input() incorrectly uses that function:

Later in udp.c the function is used correctly by udp_sendto_if_chksum().

The "matches" part of the name is confusing. It suggests boolean return value, so it's probably better to rename it to reflect that it returns an index.

Valery Ushakov <uwe>

 

Attached Files
file #28288:  udp-netif-matches-ip6.diff added by uwe (423B - text/x-diff)

 

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 uwe (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 25 Feb 2014 09:31:27 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Fri 28 Jun 2013 08:15:54 PM UTCgoldsimonPlanned Release=>1.5.0 beta1
    Tue 11 Jun 2013 12:02:05 AM UTCuweAttached File-=>Added udp-netif-matches-ip6.diff, #28288

    Back to the top


    Powered by Savane 3.1-cleanup1