From: Arran Cudbard-Bell Date: Tue, 15 Jan 2019 02:58:26 +0000 (+0700) Subject: Print detailed identity at debug level 3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769e6a5d759c1d90cb416bd7d714d64afc54e402;p=thirdparty%2Ffreeradius-server.git Print detailed identity at debug level 3 --- diff --git a/src/modules/rlm_eap/eap.c b/src/modules/rlm_eap/eap.c index 6ecdae505ab..475b6584805 100644 --- a/src/modules/rlm_eap/eap.c +++ b/src/modules/rlm_eap/eap.c @@ -869,9 +869,23 @@ eap_session_t *eap_session_continue(eap_packet_raw_t **eap_packet_p, rlm_eap_t c RDEBUG("Invalid identity response"); goto error_session; } - RDEBUG2("EAP Identity Response - \"%pV\"", - fr_box_strvalue_len(eap_session->identity, - talloc_array_length(eap_session->identity) - 1)); + + /* + * Sometimes we need the hex stream to determine where + * random junk is coming from. + */ + if (DEBUG_ENABLED3) { + RHEXDUMP(L_DBG_LVL_3, (uint8_t *const)eap_session->identity, + talloc_array_length(eap_session->identity) - 1, + "EAP Identity Response - \"%pV\"", + fr_box_strvalue_len(eap_session->identity, + talloc_array_length(eap_session->identity) - 1)); + } else { + RDEBUG2("EAP Identity Response - \"%pV\"", + fr_box_strvalue_len(eap_session->identity, + talloc_array_length(eap_session->identity) - 1)); + } + break; case FR_EAP_INVALID: