summaryrefslogtreecommitdiff
path: root/sbin/slaacd/engine.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-10-30 18:29:14 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-10-30 18:29:14 +0000
commit54cea00ef1f5c3ee3466d17554827c6a426e9bc7 (patch)
treeaa0f1dbe6267564dc5aa4ea36ba02c04949e0189 /sbin/slaacd/engine.c
parent01f511c73fd8e90c3e0d24a20fa7f2787e8cdfdc (diff)
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.
Diffstat (limited to 'sbin/slaacd/engine.c')
-rw-r--r--sbin/slaacd/engine.c7
1 files 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 <florian@openbsd.org>
@@ -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);