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

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Wed 03 Jan 2018 06:48:12 PM UTC  
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  Simon Goldschmidt <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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project Member
Wed 03 Jan 2018 06:48:12 PM UTC, original submission:  
Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.5