buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52796, ip6_addr_cmp() should not compare...

 
 

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

bug #52796: ip6_addr_cmp() should not compare zones for all addresses

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Wed 03 Jan 2018 06:48:12 PM UTC
   
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  git head

Fri 26 Jan 2018 05:33:03 AM UTC, comment #5: 

Nevermind. I've added a comment to say why ip_addr_cmp_zoneless() is used.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 09 Jan 2018 08:20:12 PM UTC, comment #4: 

So should we probably initialize the zone instead of adding a function to compare zone-less?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 08 Jan 2018 09:36:47 PM UTC, comment #3: 

The ip6_addr_assign_zone() function is used to set zones, and it only does it for addresses with certain scope. It is therefore safe to compare both the address and zone in all cases.

MDNS is special since it compared a link-local multicast address received from a zone/netif with the same address that had just been initialized (=zone 0). If the address is 'normal' (not a multicast or link-local), the cmp_zoneless is not required.

Erik Ekman <yarrick>
Group Member
Thu 04 Jan 2018 06:42:12 AM UTC, comment #2: 

Hmm, but what did you see/change in mdns then?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 03 Jan 2018 09:46:41 PM UTC, comment #1: 

Thanks for filing a bug so we don't forget this.

Both addresses were actually ff02::fb, which is a link-local multicast address. So my comment was not really correct.

I think it may be good as it is. The code seems to take care to only set the zone on scoped addresses, which worked properly in this case.

Erik Ekman <yarrick>
Group Member
Wed 03 Jan 2018 06:48:12 PM UTC, original submission:  
Simon Goldschmidt <goldsimon>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-26 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code