FFE: add NetworkManager DUID support

Bug #849994 reported by Mathieu Trudel-Lapierre
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Undecided
Mathieu Trudel-Lapierre

Bug Description

I wrote a patch to handle DHCPv6 DUIDs properly in NetworkManager; ideally this should be shipped with NM in Oneiric to properly support multiple interfaces getting consistently the same DUID across multiple DHCP requests; which should allow multiple interfaces to get the same IPv6 address if they are on the same network.

The patch is relatively simple and watches the DUID already provided by dhclient if it's available and attempts to make sure it is recorded in the future lease files when necessary. If the DUID isn't present anywhere, it will be generated as a DUID-LLT, and the values from dhclient always takes precedence.

An experimental package has been built in my PPA for testing. Testing was done and completed successfully across different permutations of DHCPv6, DHCP, SLAAC, etc. with no adverse effects.

https://launchpad.net/~mathieu-tl/+archive/nm/+sourcepub/1919157/+listing-archive-extra

Revision history for this message
Stéphane Graber (stgraber) wrote :

I ran tests on all of the following setups:
 - Single-stack SLAAC IPv6 network (with RDNSS and DNSSL)
 - Single-stack stateful DHCPv6 IPv6 network
 - Single-stack stateless DHCPv6 IPv6 network
 - Single-stack DHCPv4 IPv4 network
 - Dual-stack SLAAC IPv6 (with RDNSS and DNSSL) and DHCPv4 IPv4 network
 - Dual-stack stateful DHCPv6 IPv6 and DHCPv4 IPv4 network
 - Dual-stack stateless DHCPv6 IPv6 and DHCPv4 IPv4 network

I didn't see any regression, only limitation is "DNSSL" not working with SLAAC but that's not a regression, just another Network Manager bug :)

This change was done following a discussion I started on the Network Manager mailing list regarding non-compliance of their DHCPv6 support with the RFC.

E-mail discussion can be found at: http://mail.gnome.org/archives/networkmanager-list/2011-July/msg00189.html

As was mentioned in my e-mail, the above fix makes DHCPv6 respect section 9 of RFC 3315:
   The DUID is carried in an option because it may be variable length
   and because it is not required in all DHCP messages. The DUID is
   designed to be unique across all DHCP clients and servers, and stable
   for any specific client or server - that is, the DUID used by a
   client or server SHOULD NOT change over time if at all possible; for
   example, a device's DUID should not change as a result of a change in
   the device's network hardware.

This change is required for any IPv6 setup where you want to push per-client configuration which is extremely common setup.

The current behaviour gives you a different DUID per connection in a non-deterministic way so a DHCPv6 server administrator has effectively no way to assign per-client configuration. Also, should you be connected to the same network through two different network cards (wired + wireless) you'll be getting two different IPv6, making you loose your connections should your primary one (wired usually) get disconnected.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

debdiff for network-manager 0.9.0-0ubuntu4

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

build log

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

There will be one small change; replacing the "debug" messages that I mistakenly left behind with actual debug (e.g. changing the functions used from nm_log_info or nm_log_warn to nm_log_dbg), since we don't actually need to see the messages.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Already got some review from upstream in #nm:

<cyphermox> next step is going to be figuring out enough of how dhcpcd works to make this work there too
<dcbw1> cyphermox: yeah, some stuff could get cleaned up, but approach looks OK fo rnow

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm happy with this feature freeze exception, given stgraber's advance testing work and the upstream discussion so far. In fact, I consider the current state buggy, so it's not entirely clear to me that this is a feature, but whatever. :-)

Changed in network-manager (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 0.9.1.90-0ubuntu2

---------------
network-manager (0.9.1.90-0ubuntu2) oneiric; urgency=low

  * debian/patches/libnl3-cache-args.patch: unbreak setting route priorities,
    which will also unbreak cases where connections fails when wired and wifi
    are connected to the same network. (LP: #856333)
  * debian/patches/dhcpv6-duid-support.patch: support handling DUIDs for DHCPv6
    requests, as defined by RFC 3315, section 9. (LP: #849994)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 28 Sep 2011 11:59:27 -0400

Changed in network-manager (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.