While here address some hangup issues.
struct dhcp6_state *state;
state = D6_STATE(ifp);
- if (state->state != DH6S_BOUND)
+ if (state->state != DH6S_BOUND) {
+ dhcp6_finishrelease(ifp);
return;
-
- /* RFC8415 18.2.7 says we must stop using the addresses before
- * we send the release message. */
- dhcp6_freedrop_addrs(ifp, 0, IPV6_AF_DELEGATED, NULL);
+ }
state->state = DH6S_RELEASE;
state->RTC = 0;
{
struct dhcpcd_ctx *ctx = arg;
- if (ctx->options & DHCPCD_EXITING)
- return;
-
if (events != ELE_READ)
logerrx("%s: unexpected event 0x%04x", __func__, events);
struct msghdr msg = { .msg_iov = iov, .msg_iovlen = 1 };
bool stop = false;
+ if (events & ELE_HANGUP) {
+ len = 0;
+ goto stop;
+ }
if (!(events & ELE_READ))
logerrx("%s: unexpected event 0x%04x", __func__, events);
}
if (stop) {
+stop:
ctx->options |= DHCPCD_EXITING;
#ifdef PRIVSEP_DEBUG
logdebugx("process %d stopping", getpid());