]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
compare hex values side by side
authorAlan T. DeKok <aland@freeradius.org>
Wed, 25 Oct 2017 20:30:48 +0000 (16:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 25 Oct 2017 20:30:48 +0000 (16:30 -0400)
src/modules/rlm_eap/radeapclient.c

index ff69361e426fd76f566070c23a47baa936e5754c..7fb6b30b24ec4460b3e4330fd45b1df31ad91ba2 100644 (file)
@@ -871,31 +871,14 @@ static int rc_process_eap_challenge(rc_eap_context_t *eap_context,
          if (memcmp(randcfg[0], randcfgvp[0]->vp_octets, EAPSIM_RAND_SIZE)!=0 ||
             memcmp(randcfg[1], randcfgvp[1]->vp_octets, EAPSIM_RAND_SIZE)!=0 ||
             memcmp(randcfg[2], randcfgvp[2]->vp_octets, EAPSIM_RAND_SIZE)!=0) {
-           int rnum,i,j;
+           int rnum,i;
 
            ERROR("one of rand 1,2,3 didn't match");
            for (rnum = 0; rnum < 3; rnum++) {
-             ERROR("received   rand %d: ", rnum);
-             j=0;
+             ERROR("rand %d\trecv\tconfig", rnum);
              for (i = 0; i < EAPSIM_RAND_SIZE; i++) {
-               if (j==4) {
-                 DEBUG("_");
-                 j=0;
-               }
-               j++;
-
-               ERROR("%02x", randcfg[rnum][i]);
-             }
-             ERROR("configured rand %d: ", rnum);
-             j=0;
-             for (i = 0; i < EAPSIM_RAND_SIZE; i++) {
-               if (j==4) {
-                 DEBUG("_");
-                 j=0;
-               }
-               j++;
-
-               ERROR("%02x", randcfgvp[rnum]->vp_octets[i]);
+                     fprintf(fr_log_fp, "\t%02x\t%02x\n",
+                             randcfg[rnum][i], randcfgvp[rnum]->vp_octets[i]);
              }
            }
            return 0;