buglwIP - A Lightweight TCP/IP stack - Bugs: bug #43095, IPv6 Neighbor Discovery Protocol ...

 
 

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

bug #43095: IPv6 Neighbor Discovery Protocol need to be change

Submitted by:  任海波 <hichard>
Submitted on:  Thu 28 Aug 2014 02:10:13 AM UTC  
 
Category: IPv6Severity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: Ivan Delamer <idelamer>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

(Jump to the original submission Jump to the original submission)

Wed 18 Mar 2015 07:22:37 PM UTC, comment #7:

This is now fixed. thanks for reporting.

The extra function for adding cache entries will come at a later time, as some conditional hook.

Ivan Delamer <idelamer>
Project MemberIn charge of this item.
Wed 03 Sep 2014 05:05:07 PM UTC, comment #6:

Thank you Hichard for posting, and thank you Simon for converting to patch (hichard: you just posted your code, not the diff).

After analyzing, I see that it's true that the current code could have issues if we have a netif with 6-byte MAC addresses and another with 8-byte MAC addresses.

I will change it with the addition of masking the length field to avoid errors or hacking.

Ivan Delamer <idelamer>
Project MemberIn charge of this item.
Wed 03 Sep 2014 05:54:28 AM UTC, comment #5:

File #32017 is not really a patch. I modified that file to create a real patch. I haven't separated the length fix from the rest that's in there though ('#if LWIP_RPL' as well as the function 'nd6_neighbor_cach_add' which does not seem to be used anywhere)

(file #32018)

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 03 Sep 2014 01:44:40 AM UTC, comment #4:

Hello Ivan:
I had make a patch for nd6. Please receive it.I add a new function nd6_neighbor_cach_add(). I write a rpl router protocol for lwip. I need to add the neignbor with rpl message.

(file #32017)

任海波 <hichard>
Tue 02 Sep 2014 07:05:50 PM UTC, comment #3:

I don't think it's a duplicate, I think the concern is that the link-layer address option can take a variable number of bytes in a packet, usually 8 but sometimes 16. If NETIF_MAX_HWADDR_LEN = 6 then sometimes we only check for length 8 bytes fitting in a pbuf. It is really all that we would use, a longer address wouldn't match the network interface.

When there are multiple option, code looks at the length byte in the option and calculates it variably.

I still would like to see the patch to make sure I didn't misunderstand. hichard: could you post a patch with your suggestion?

Ivan Delamer <idelamer>
Project MemberIn charge of this item.
Tue 02 Sep 2014 06:19:25 PM UTC, comment #2:

> lladdr_option length need to be Variable,but it is handled as a const


Isn't this a duplicate to bug #42998 (The netif hardware adddress length need to be changed) which is now fixed? By overriding NETIF_MAX_HWADDR_LEN to 8, it should work now.

> I strongly recommended add some callback when add or delete the neighbor.


Hmm, that's a strange suggestion. We don't have that many callbacks to internal stack state changes. Why would we need one for ND6 changes?

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 28 Aug 2014 04:23:54 PM UTC, comment #1:

I accidentally deleted your attachment, but could you re-upload it as a patch?

Seems to be that the constant check is to see if the option fits in the pbuf. Otherwise, with multiple options, the size is taken from second byte and calculated as a variable.

Where are you getting an error?

Ivan Delamer <idelamer>
Project MemberIn charge of this item.
Thu 28 Aug 2014 02:10:13 AM UTC, original submission:

Hello Ivan:
I use lwip in 802.15.4, Its mac address is 8 bytes. IPv6 Neighbor Discovery Protocol, which is in the file nd6.c. lladdr_option length need to be Variable,but it is handled as a const. I strongly recommended add some callback when add or delete the neighbor.

任海波 <hichard>

 

Attached Files
file #32018:  nd6_bug43095.patch added by goldsimon (9KiB - application/octet-stream)
file #32017:  nd6_new.patch added by hichard (122KiB - 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 idelamer (Posted a comment)
  • -unavailable- added by hichard (Submitted the item)
  • -unavailable- added by hichard
  •  

    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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Mar 2015 07:22:37 PM UTCidelamerStatusConfirmed=>Fixed
      Assigned toNone=>idelamer
      Open/ClosedOpen=>Closed
    Wed 03 Sep 2014 05:05:07 PM UTCidelamerStatusWorks For Me=>Confirmed
    Wed 03 Sep 2014 05:54:28 AM UTCgoldsimonAttached File-=>Added nd6_bug43095.patch, #32018
    Wed 03 Sep 2014 01:44:40 AM UTChichardAttached File-=>Added nd6_new.patch, #32017
    Tue 02 Sep 2014 06:19:25 PM UTCgoldsimonStatusNone=>Works For Me
    Thu 28 Aug 2014 04:22:08 PM UTCidelamerAttached File#31987=>Removed
    Thu 28 Aug 2014 02:10:13 AM UTChichardAttached File-=>Added nd6.c, #31987
      Carbon-Copy-=>Added ivan

    Back to the top


    Powered by Savane 3.1-cleanup1