patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9207, ip6/nd6 improvements

 
 

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

patch #9207: ip6/nd6 improvements

Submitter:  David van Moolenbroek <dcvmoole>
Submitted:  Tue 03 Jan 2017 07:31:07 PM UTC
   
 
Category:  IPv6 Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Wed 11 Jan 2017 07:25:34 AM UTC, comment #4: 

Thank your very much David! You work is highly appreciated!

Dirk Ziegelmeier <dziegel>
Group administrator
Tue 10 Jan 2017 11:25:37 PM UTC, comment #3: 

Attached is a slightly better version of the 0007-ip6-improve-source-address-selection patch. By using preexisting multicast scopes, the patch no longer needs to add its own 'enum' block or test against specific multicast types explicitly. As a result, this new version is slightly cleaner and ever-so-slightly faster, while behaving exactly the same as the previous version of the patch. This update does not affect any of the other patches.

As an aside, I have now also tested the source selection algorithm in this patch against a large number of test cases, including all the applicable examples that are included in RFC 6724. These tests turned up no bugs.

(file #39430)

David van Moolenbroek <dcvmoole>
Tue 03 Jan 2017 10:44:27 PM UTC, comment #2: 

:) happy to help!

David van Moolenbroek <dcvmoole>
Tue 03 Jan 2017 07:49:44 PM UTC, comment #1: 

I can only say, thank you so much for the contribution. I can't at the moment review and merge, but it's awesome that you've prepared this.
Cheers, Ivan

Ivan Delamer <idelamer>
Group Member
Tue 03 Jan 2017 07:31:07 PM UTC, original submission:  

This set of patches aims to improve the IPv6 support in lwIP; the Neighbor Discovery implementation in particular. Many of the patches are implementing or improving on required parts of RFCs with which lwIP aims to be compliant. As part of this, several of the patches add extra comments to document of the current state, including known but yet unresolved shortcomings. The attached zip file (I hope that's okay - savannah only allows attaching four files it seems) contains the following nine patches:

0001-nd6-improve-address-autoconfiguration-support: This patch, which is the largest of the set, aims to resolve bug #47923 and bug #48162, by properly decoupling on-link prefixes from address auto-configuration. The commit message explains why this change requires the introduction of per-address lifetimes and a new DUPLICATED address state.

0002-nd6-check-link-status-before-sending-packets: A small patch to change link status in addition to interface status, bringing one aspect of the ND implementation more in line with the rest of lwIP.

0003-nd6-fix-Duplicate-Address-Detection: Testing revealed that DAD is broken for non-link-local addresses. This patch fixes that.

0004-netif-more-ip6-state-changes-invoke-status-callback: Applications that keep shadow state per IPv6 address need to be aware of more state changes. I am aware of task #14283, but I needed this now in order to allow proper testing of my changes, and I imagine it might be useful for others as well.

0005-nd6-improve-router-selection: This patch was basically required for a clean implementation of the next patch (0006) by altering the expectations for nd6_find_route(), but ended up changing router selection for the better: netif status is now considered when picking a router; invalid routers may now actually be selected (as was the intention before); and, while round-robin selection was only partially implemented (as I mentioned in the patch #8680 thread), it is now fully supported.

0006-ip6-nd6-route-using-on-link-prefixes-not-addresses: This patch implements compliance with at least the most important aspects of RFC 5942. The change was also suggested by Jan Breuer in the two bug threads mentioned earlier. In short: on-link prefixes are now used for routing, while dynamically assigned (= auto-configured) addresses no longer imply a local subnet. Statically assigned (= manual) address assignments do keep working exactly as before, though, as that is what anyone would expect.

0007-ip6-improve-source-address-selection: The current IPv6 source selection algorithm does not support the DEPRECATED address state and takes a few too many other shortcuts. This patch rewrites the algorithm to be much more in accordance with RFCs 3484/6724.

0008-nd6-some-work-on-basic-RFC-4861-compliance: RFC 4861 has very clear and required rules on basic message handling, but the implementation of those rules was missing almost entirely. This patch makes a start and documents the rest.

0009-nd6-cull-destination-cache-on-router-removal: I mentioned missing destination cache invalidation in the patch #8680 thread; this patch adds support for such (as it turns out, required) invalidation.

Even though the current lwIP IPv6 implementation is unfortunately still far from standards compliant, I hope that these patches at least push it in the right direction. The patches have been tested to the best of my abilities. As always, feedback welcome etc..

(CC people associated with the previous bug reports, my apologies if this is not interesting to you though!)

David van Moolenbroek <dcvmoole>

 

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

Attached Files
file #39356:  ip6-nd6-improvements.zip added by dcvmoole (25KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by idelamer (Posted a comment)
  • -email is unavailable- added by dcvmoole (Submitted the item)
  • -email is unavailable- added by dcvmoole
  • -email is unavailable- added by dcvmoole
  • -email is unavailable- added by dcvmoole
  • -email is unavailable- added by dcvmoole
  • -email is unavailable- added by dcvmoole
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-11 dziegel StatusNone Done
        Open/ClosedOpen Closed
    2017-01-10 dcvmoole Attached File- Added 0007-ip6-improve-source-address-selection.patch, #39430
    2017-01-03 dcvmoole Attached File- Added ip6-nd6-improvements.zip, #39356
        Carbon-Copy- Added idelamer
        Carbon-Copy- Added goldsimon
        Carbon-Copy- Added jan_breuer
        Carbon-Copy- Added abhiambure
        Carbon-Copy- Added izikgo

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code