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

Submitter:  任海波 <hichard>
Submitted:  Thu 28 Aug 2014 02:10:13 AM UTC
   
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  idelamer
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

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>
Group Member
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>
Group Member
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>
Group 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>
Group Member
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>
Group 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>
Group Member
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>

 

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

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
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by idelamer (Posted a comment)
  • -email is unavailable- added by hichard (Submitted the item)
  • -email is unavailable- added by hichard
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-18 idelamer StatusConfirmed Fixed
        Assigned toNone idelamer
        Open/ClosedOpen Closed
    2014-09-03 idelamer StatusWorks For Me Confirmed
    2014-09-03 goldsimon Attached File- Added nd6_bug43095.patch, #32018
    2014-09-03 hichard Attached File- Added nd6_new.patch, #32017
    2014-09-02 goldsimon StatusNone Works For Me
    2014-08-28 idelamer Attached File#31987 Removed
    2014-08-28 hichard Attached File- Added nd6.c, #31987
        Carbon-Copy- Added ivan

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code