]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print detailed identity at debug level 3
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 15 Jan 2019 02:58:26 +0000 (09:58 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 15 Jan 2019 02:58:26 +0000 (09:58 +0700)
src/modules/rlm_eap/eap.c

index 6ecdae505ab72126a7136d108ca2b05707425a70..475b65848053a4cbe6f181ddb652786ca6dd70e3 100644 (file)
@@ -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: