*/
first = pairfind(vps, PW_EAP_MESSAGE, 0);
if (first == NULL) {
- radlog(L_ERR, "rlm_eap: EAP-Message not found");
+ DEBUG("rlm_eap: EAP-Message not found");
return NULL;
}
* Sanity check the length before doing anything.
*/
if (first->length < 4) {
- radlog(L_ERR, "rlm_eap: EAP packet is too short.");
+ DEBUG("rlm_eap: EAP packet is too short.");
return NULL;
}
* Take out even more weird things.
*/
if (len < 4) {
- radlog(L_ERR, "rlm_eap: EAP packet has invalid length.");
+ DEBUG("rlm_eap: EAP packet has invalid length.");
return NULL;
}
total_len += vp->length;
if (total_len > len) {
- radlog(L_ERR, "rlm_eap: Malformed EAP packet. Length in packet header does not match actual length");
+ DEBUG("rlm_eap: Malformed EAP packet. Length in packet header does not match actual length");
return NULL;
}
}
* If the length is SMALLER, die, too.
*/
if (total_len < len) {
- radlog(L_ERR, "rlm_eap: Malformed EAP packet. Length in packet header does not match actual length");
+ DEBUG("rlm_eap: Malformed EAP packet. Length in packet header does not match actual length");
return NULL;
}
inst = (rlm_eap_t *) instance;
+ if (!pairfind(request->packet->vps, PW_EAP_MESSAGE)) {
+ RDEBUG("ERROR: You set 'Auth-Type = EAP' for a request that does not contain an EAP-Message attribute!");
+ return RLM_MODULE_INVALID;
+ }
+
/*
* Get the eap packet to start with
*/
return RLM_MODULE_FAIL;
}
pairadd(&request->config_items, vp);
+ } else {
+ RDEBUG2("WARNING: Auth-Type already set. Not setting to EAP");
}
if (status == EAP_OK) return RLM_MODULE_OK;