summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorKevin P. Fleming <kevin@km6g.us>2020-02-08 21:40:40 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-02-10 07:37:30 +0100
commit0ddad04eda2a29a8df861d8b743f3c7be0333ce8 (patch)
tree2083abb0d70b39d690d7e2e2efebda389b01a677 /src/network
parentnetwork: Rewrite IPv6Token documentation for new modes (diff)
downloadsystemd-0ddad04eda2a29a8df861d8b743f3c7be0333ce8.tar.xz
systemd-0ddad04eda2a29a8df861d8b743f3c7be0333ce8.zip
network: Document the lack of actual DAD usage in prefixstable algorithm
The RFC 7217 (prefixstable) algorithm can use Duplicate Address Detection to produce multiple candidate addresses, but the implementation here does not currently employ that mechanism.
Diffstat (limited to '')
-rw-r--r--src/network/networkd-ndisc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 4a67731948..f97cd1c771 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -268,6 +268,11 @@ static int ndisc_router_generate_address(Link *link, unsigned prefixlen, uint32_
ORDERED_HASHMAP_FOREACH(j, link->network->ipv6_tokens, i)
if (j->address_generation_type == IPV6_TOKEN_ADDRESS_GENERATION_PREFIXSTABLE
&& memcmp(&j->prefix, &addr, FAMILY_ADDRESS_SIZE(address->family)) == 0) {
+ /* While this loop uses dad_counter and a retry limit as specified in RFC 7217, the loop
+ does not actually attempt Duplicate Address Detection; the counter will be incremented
+ only when the address generation algorithm produces an invalid address, and the loop
+ may exit with an address which ends up being unusable due to duplication on the link.
+ */
for (; j->dad_counter < DAD_CONFLICTS_IDGEN_RETRIES_RFC7217; j->dad_counter++) {
r = make_stableprivate_address(link, &j->prefix, prefixlen, j->dad_counter, &address->in_addr.in6);
if (r < 0)