summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-02-06 12:58:43 +0000
committerRoy Marples <roy@marples.name>2020-02-06 12:58:43 +0000
commit8739d809550a0a0858312eb7048eb1a46058dc90 (patch)
tree4e41db49d4000f6316dfbd7c9f9bb54cf0376fea /src/ipv6.c
parent3e0c93a4bbb16e250510dbbadba6b6d8971f8d2c (diff)
downloaddhcpcd-8739d809550a0a0858312eb7048eb1a46058dc90.tar.xz
DHCP6: Clean up old lease when we fail to confirm/rebind, etc
Also removed the TIMEOUT states which makes things easier to read.
Diffstat (limited to 'src/ipv6.c')
-rw-r--r--src/ipv6.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index 216f0c70..cfeeda0b 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -1528,9 +1528,10 @@ ipv6_newaddr(struct interface *ifp, const struct in6_addr *addr,
/* If adding a new DHCP / RA derived address, check current flags
* from an existing address. */
ia = ipv6_iffindaddr(ifp, addr, 0);
- if (ia != NULL)
+ if (ia != NULL) {
addr_flags = ia->addr_flags;
- else
+ flags |= IPV6_AF_ADDED;
+ } else
addr_flags = IN6_IFF_TENTATIVE;
ia = calloc(1, sizeof(*ia));