buf[buf_len++] = '=';
for (size_t i = 0; i < len / sizeof(*e); ++i) {
+ /*
+ * The only invalid entries allowed to be passed to the script are prefix entries.
+ * This will allow immediate removal of the old ipv6-prefix-assignment that might
+ * otherwise be kept for up to 2 hours (see L-13 requirement of RFC 7084).
+ */
+ if (!e[i].valid && type != ENTRY_PREFIX)
+ continue;
+
inet_ntop(AF_INET6, &e[i].target, &buf[buf_len], INET6_ADDRSTRLEN);
buf_len += strlen(&buf[buf_len]);
(uint8_t*)e < &start[len] &&
(uint8_t*)odhcp6c_next_entry(e) <= &start[len];
e = odhcp6c_next_entry(e)) {
+ if (!e->valid)
+ continue;
c = mempcpy(c, e->auxtarget, e->auxlen);
*c++ = ' ';
}
signal(SIGTERM, SIG_DFL);
if (delay > 0) {
sleep(delay);
- odhcp6c_expire();
+ odhcp6c_expire(false);
}
struct in6_addr *addr = odhcp6c_get_state(STATE_SERVER_ADDR, &addr_len);