Skip to content

dhcp: decline IPv6 lease if all adresses fail DAD

Beniamino Galvani requested to merge bg/dhcp6-dad-pt2 into main

Currently we accept the DHCPv6 just after addresses are configured on kernel, without waiting DAD result. Instead, wait that DAD completes and decline the lease if all addresses are detected as duplicate.

Note that when an address has non-infinite lifetime and fails DAD, kernel removes it automatically. With iproute2 we see something like:

602: testX6    inet6 2620::1234:5678/128 scope global tentative dynamic noprefixroute
       valid_lft 7500sec preferred_lft 7200sec
Deleted 602: testX6    inet6 2620::1234:5678/128 scope global dadfailed tentative dynamic noprefixroute
       valid_lft 7500sec preferred_lft 7200sec

Since the address gets removed from the platform cache, at the moment we don't have a way to check the flags of the removal message. Therefore, we assume that any address that goes away in tentative state was detected as duplicate.

At the moment, only the dhclient plugin supports sending a DHCPv6 DECLINE.

https://bugzilla.redhat.com/show_bug.cgi?id=2096386

Merge request reports