Skip to content

Commit

Permalink
complain if we get TEAP inside of TEAP
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Dec 11, 2024
1 parent b36fea2 commit fb16acc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
10 changes: 8 additions & 2 deletions raddb/mods-available/eap
Original file line number Diff line number Diff line change
Expand Up @@ -1163,8 +1163,14 @@ eap {
#
# The values for those attributes are the same as for EAP-Type.
#
# user_eap_type = mschapv2
# machine_eap_type = tls
# Note that if you try to use "EAP-Type := TEAP" in the
# "inner-tunnel" virtual server, it will not work.
#
# Supported authentication methods inside of TEAP are
# EAP-TLS, EAP-MSCHAPv2, and PAP.
#
# user_eap_type = mschapv2
# machine_eap_type = tls

# If 'cipher_list' is set here, it will over-ride the
# 'cipher_list' configuration from the 'tls-common'
Expand Down
10 changes: 9 additions & 1 deletion src/modules/rlm_eap/types/rlm_eap_teap/rlm_eap_teap.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int mod_instantiate(CONF_SECTION *cs, void **instance)

} else {
invalid_identity:
cf_log_err_cs(cs, "Invalid value in identity_types = '%s' %s",
cf_log_err_cs(cs, "Invalid value in identity_types = '%s' at %s",
inst->identity_type_name, p);
return -1;
}
Expand Down Expand Up @@ -245,6 +245,14 @@ static int mod_session_init(void *type_arg, eap_handler_t *handler)

handler->tls = true;

if (request->parent) {
RWDEBUG("----------------------------------------------------------------------");
RWDEBUG("You have configured TEAP to run inside of TEAP. THIS WILL NOT WORK.");
RWDEBUG("Supported inner methods for TEAP are EAP-TLS, EAP-MSCHAPv2, and PAP.");
RWDEBUG("Other methods may work, but are not actively supported.");
RWDEBUG("----------------------------------------------------------------------");
}

/*
* Check if we need a client certificate.
*/
Expand Down

0 comments on commit fb16acc

Please sign in to comment.