[systemd-devel] [PATCH 00/11] DHCPv6 address assignment

Patrik Flykt patrik.flykt at linux.intel.com
Tue Jan 13 04:02:10 PST 2015


Here is a patch set covering on-link prefix detection and using the prefix
length information when setting DHCPv6 addresses.

To be able to have a correct prefix for the IPv6 adresses, the prefixes
need to be collected in patches 03 and 04. Prefix handling and matching
happens in patch 07. Patch 08 contains a test case for these.

ICMPv6 Router Advertisement MTU values are collected in patch 05 with an
extremely trivial test in patch 06 - basically there to just ensure some
functionality exists.

If the prefix information ever expires, patch 09 is there to make it
possible to fetch the expired one.

With the help of the revised address iteration functions in patch 02,
patch 10 fetches the proper prefix length and sets the IPv6 address. The
patch also attempts to upgrade the IPv6 address prefix length to 128
should the prefix ever expire, it does so but misses to decrement address
lifetimes. Something to do for a next patch or two, I guess.

In addition, patch 01 clears up a forgotten debug printout while patch 11
fetches DNS and NTP information. Fetching DNS and NTP information have not
been tested or used yet so proceed with caution or leave patch 11 for later.

Please review,


Patrik Flykt (11):
  sd-dhcp6-client: Remove unnecessary debug printout
  sd-dhcp6-lease: Revise address iteration functions
  sd-icmp6-nd: Update Router Advertisement handling
  sd-icmp6-nd: Add link and prefix structures for ICMPv6
  sd-icmp6-nd: Add helper function to get the IPv6 link MTU
  test-icmp6-rs: Add trivial test case for a MTU that is not present
  sd-icmp6-nd: Parse ICMPv6 prefix information
  test-icmp6-nd: Add test cases for prefixes
  sd-icmp6-nd: Add support for fetching the latest expired prefix
  networkd-dhcp6: Assign DHCPv6 addresses and prefix lengths
  sd_dhcp6_lease: Support DNS and NTP options

 src/libsystemd-network/dhcp6-internal.h       |   3 +
 src/libsystemd-network/dhcp6-lease-internal.h |  18 ++
 src/libsystemd-network/dhcp6-option.c         |  22 ++
 src/libsystemd-network/dhcp6-protocol.h       |   6 +
 src/libsystemd-network/sd-dhcp6-client.c      |  23 +-
 src/libsystemd-network/sd-dhcp6-lease.c       | 162 +++++++++-
 src/libsystemd-network/sd-icmp6-nd.c          | 449 +++++++++++++++++++++++++-
 src/libsystemd-network/test-dhcp6-client.c    |  37 +--
 src/libsystemd-network/test-icmp6-rs.c        | 221 ++++++++++++-
 src/network/networkd-dhcp6.c                  | 179 +++++++++-
 src/network/networkd-link.h                   |  10 +
 src/network/networkd.c                        |   1 +
 src/systemd/sd-dhcp6-lease.h                  |  13 +-
 src/systemd/sd-icmp6-nd.h                     |  10 +
 14 files changed, 1088 insertions(+), 66 deletions(-)


More information about the systemd-devel mailing list