Cleaned up debugging
authoraland <aland>
Tue, 27 Nov 2007 15:05:25 +0000 (15:05 +0000)
committeraland <aland>
Tue, 27 Nov 2007 15:05:25 +0000 (15:05 +0000)
src/modules/rlm_eap/types/rlm_eap_peap/peap.c
src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c

index af0ba4f..c4d9925 100644 (file)
@@ -590,9 +590,10 @@ int eappeap_process(EAP_HANDLER *handler, tls_session_t *tls_session)
 
        /*
         *      Just look at the buffer directly, without doing
-        *      record_minus.
+        *      record_minus.  This lets us avoid another data copy.
         */
        data_len = tls_session->clean_out.used;
+       tls_session->clean_out.used = 0;
        data = tls_session->clean_out.data;
 
 #ifndef NDEBUG
@@ -609,10 +610,10 @@ int eappeap_process(EAP_HANDLER *handler, tls_session_t *tls_session)
 #endif
 
        if (!eapmessage_verify(data, data_len)) {
+               DEBUG2("  rlm_eap_peap: Tunneled data is invalid.");
                return RLM_MODULE_REJECT;
        }
 
-       DEBUG2("  rlm_eap_peap: Tunneled data is valid.");
 
        /*
         *      If we authenticated the user, then it's OK.
@@ -702,8 +703,6 @@ int eappeap_process(EAP_HANDLER *handler, tls_session_t *tls_session)
         *      Add the State attribute, too, if it exists.
         */
        if (t->state) {
-               DEBUG2("  PEAP: Adding old state with %02x%02x",
-                      t->state->vp_octets[0], t->state->vp_octets[1]);
                vp = paircopy(t->state);
                if (vp) pairadd(&fake->packet->vps, vp);
        }
index 0b9236e..317a382 100644 (file)
@@ -180,7 +180,6 @@ static int eappeap_authenticate(void *arg, EAP_HANDLER *handler)
        DEBUG2("  rlm_eap_peap: Authenticate");
 
        status = eaptls_process(handler);
-       tls_session->clean_out.used = 0;
        DEBUG2("  eaptls_process returned %d\n", status);
        switch (status) {
                /*