#endif
}
}
+#ifdef AUTH
+ else if (state->auth.reconf != NULL) {
+ /*
+ * Drop the lease as the token may only be present
+ * in the initial reply message and not subsequent
+ * renewals.
+ * If dhcpcd is restarted, the token is lost.
+ * XXX persist this in another file?
+ */
+ dhcp_unlink(ifp->ctx, state->leasefile);
+ }
+#endif
eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
#ifdef AUTH
loginfox("%s: accepted reconfigure key", ifp->name);
} else if (ifo->auth.options & DHCPCD_AUTH_SEND) {
if (ifo->auth.options & DHCPCD_AUTH_REQUIRE) {
- logerr("%s: no authentication from %s",
+ logerrx("%s: no authentication from %s",
ifp->name, sfrom);
return;
}
}
if (r->type == DHCP6_RECONFIGURE) {
- logdebugx("%s: RECONFIGURE6 recv from %s,"
- " sending to all interfaces",
- ifp->name, sfrom);
- TAILQ_FOREACH(ifp, ctx->ifaces, next) {
- state = D6_CSTATE(ifp);
- if (state != NULL && state->send != NULL)
- dhcp6_recvif(ifp, sfrom, r, len);
+ if (!IN6_IS_ADDR_LINKLOCAL(&from->sin6_addr)) {
+ logerrx("%s: RECONFIGURE6 recv from %s, not LL",
+ ifp->name, sfrom);
+ return;
}
- return;
+ goto recvif;
}
state = D6_CSTATE(ifp);
len = (size_t)tlen;
#endif
+recvif:
dhcp6_recvif(ifp, sfrom, r, len);
}
}
dhcp_unlink(ifp->ctx, state->leasefile);
}
+#ifdef AUTH
+ else if (state->auth.reconf != NULL) {
+ /*
+ * Drop the lease as the token may only be present
+ * in the initial reply message and not subsequent
+ * renewals.
+ * If dhcpcd is restarted, the token is lost.
+ * XXX persist this in another file?
+ */
+ dhcp_unlink(ifp->ctx, state->leasefile);
+ }
+#endif
+
dhcp6_freedrop_addrs(ifp, drop, NULL);
free(state->old);
state->old = state->new;