From: Alan T. DeKok Date: Tue, 19 Jan 2016 20:39:36 +0000 (-0500) Subject: move check to be closer to where it's needed X-Git-Tag: release_3_0_11~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84caa5cb2a27f412becf4e8f304d241d53a86c36;p=thirdparty%2Ffreeradius-server.git move check to be closer to where it's needed --- diff --git a/src/modules/rlm_eap/types/rlm_eap_peap/peap.c b/src/modules/rlm_eap/types/rlm_eap_peap/peap.c index a41f7812e5a..967bb424c0b 100644 --- a/src/modules/rlm_eap/types/rlm_eap_peap/peap.c +++ b/src/modules/rlm_eap/types/rlm_eap_peap/peap.c @@ -1023,13 +1023,6 @@ rlm_rcode_t eappeap_process(eap_handler_t *handler, tls_session_t *tls_session, if (vp) { eap_tunnel_data_t *tunnel; - if (!auth_type_eap) { - RERROR("You must set 'inner_eap_module' in the 'peap' configuration"); - RERROR("This is required in order to proxy the inner EAP session."); - rcode = RLM_MODULE_REJECT; - goto done; - } - /* * The tunneled request was NOT handled, * it has to be proxied. This means that @@ -1053,6 +1046,12 @@ rlm_rcode_t eappeap_process(eap_handler_t *handler, tls_session_t *tls_session, * Auth-Type & EAP-Message here? */ + if (!auth_type_eap) { + RERROR("You must set 'inner_eap_module' in the 'peap' configuration"); + RERROR("This is required in order to proxy the inner EAP session."); + rcode = RLM_MODULE_REJECT; + goto done; + } /* * Run the EAP authentication.