This patch set clears up the code related to prefix handling when setting
IPv6 addresses from DHCPv6. Instead of explicitely tracking prefixes,
instruct the kernel not to create routes based on the IPv6 address and its
prefix length.

The flag value to use is IFA_F_NOPREFIXROUTE, and as it is longer than
the traditional eight bit rtnl flag value, these bigger flag values need
to be set with the auxilliary IFA_FLAGS attribute. For completeness, keep
on setting the lowermost eight bits in the rtnl flag as before.

With this change more code dealing with Router Advertisment prefixes and
their disappearance can be removed. I did not do that yet, though, as the
code may still be useful in the future - let's see.

Please review & test,


Patrik Flykt (3):
  sd-rtnl: Always enable IFA_FLAGS
  systemd-networkd: Use IFA_F_NOPREFIXROUTE with IPv6 addresses
  networkd-dhcp6: Do not handle prefix expiry

 src/libsystemd/sd-rtnl/rtnl-types.c |  2 --
 src/network/networkd-address.c      | 20 ++++++++++++++--
 src/network/networkd-dhcp6.c        | 46 ++++---------------------------------
 src/network/networkd-link.c         |  4 +++-
 src/network/networkd.h              |  2 +-
 5 files changed, 26 insertions(+), 48 deletions(-)


systemd-devel mailing list

Reply via email to