unsigned int i;
char *msg;
bool bootp_copied;
- const uint8_t *auth;
#ifdef AUTH
+ const uint8_t *auth;
size_t auth_len;
#endif
#ifdef IN_IFF_DUPLICATED
}
LOGDHCP0(LOG_WARNING, "no authentication");
}
-#else
- auth = NULL;
#endif
/* RFC 3203 */
LOGDHCP(LOG_ERR, "discarding Force Renew");
return;
}
+#ifdef AUTH
if (auth == NULL) {
- LOGDHCP(LOG_ERR, "unauthenticated Force Renew");
+ LOGDHCP(LOG_ERR, "unauthenticated force renew");
if (ifo->auth.options & DHCPCD_AUTH_REQUIRE)
return;
}
send_inform, ifp);
dhcp_inform(ifp);
}
+#else
+ LOGDHCP(LOG_ERR, "unauthenticated force renew");
+#endif
return;
}
if (ifo->mudurl[0])
len += sizeof(o) + ifo->mudurl[0];
+#ifdef AUTH
if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
DHCPCD_AUTH_SENDREQUIRE)
len += sizeof(o); /* Reconfigure Accept */
+#endif
}
len += sizeof(*state->send);
if (ifo->mudurl[0])
COPYIN(D6_OPTION_MUDURL,
ifo->mudurl + 1, ifo->mudurl[0]);
-
+#ifdef AUTH
if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
DHCPCD_AUTH_SENDREQUIRE)
COPYIN1(D6_OPTION_RECONF_ACCEPT, 0);
+#endif
if (n_options) {
o_lenp = NEXTLEN;
syslog(LOG_WARNING, "%s: no authentication from %s",
ifp->name, ctx->sfrom);
}
-#else
- auth = NULL;
#endif
op = dhcp6_get_op(r->type);
return;
break;
case DHCP6_RECONFIGURE:
+#ifdef AUTH
if (auth == NULL) {
+#endif
syslog(LOG_ERR, "%s: unauthenticated %s from %s",
ifp->name, op, ctx->sfrom);
if (ifo->auth.options & DHCPCD_AUTH_REQUIRE)
return;
+#ifdef AUTH
}
syslog(LOG_INFO, "%s: %s from %s",
ifp->name, op, ctx->sfrom);
break;
}
return;
+#endif
default:
syslog(LOG_ERR, "%s: invalid DHCP6 type %s (%d)",
ifp->name, op, r->type);