From 54cea00ef1f5c3ee3466d17554827c6a426e9bc7 Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Fri, 30 Oct 2020 18:29:14 +0000 Subject: If Duplicate Address Detection (DAD) fails only generate a new address if we are using Semantically Opaque Interface Identifiers (soii) otherwise we would just create the same address again and DAD will fail again. --- sbin/slaacd/engine.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index edddd8573c1..8193e3966fc 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.55 2020/10/30 18:28:38 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.56 2020/10/30 18:29:13 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -1906,9 +1906,8 @@ update_iface_ra_prefix(struct slaacd_iface *iface, struct radv *ra, if (!found && duplicate_found && iface->soii) { prefix->dad_counter++; log_debug("%s dad_counter: %d", __func__, prefix->dad_counter); - } - - if (!found && (iface->soii || prefix->prefix_len <= 64)) + gen_address_proposal(iface, ra, prefix, 0); + } else if (!found && (iface->soii || prefix->prefix_len <= 64)) /* new proposal */ gen_address_proposal(iface, ra, prefix, 0); -- cgit v1.2.3