]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Hmm this check just seems kinda broken
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 May 2017 19:23:47 +0000 (15:23 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 May 2017 19:39:31 +0000 (15:39 -0400)
src/modules/rlm_eap/types/rlm_eap_peap/peap.c

index c303f651981fbf0388b8baf6a13013b5c6f6dd22..1ba95f39da3921d0dc14b4921c18251418fc8636 100644 (file)
@@ -218,25 +218,18 @@ static int eap_peap_verify(REQUEST *request,
                return 0;
        }
 
-       eap_method = *data;
-       switch (eap_method) {
-       case FR_EAP_IDENTITY:
-               RDEBUG2("Received EAP-Identity-Response");
-               return 1;
-
-       /*
-        *      If the first byte of the packet is
-        *      EAP-Response, and the EAP data is a TLV,
-        *      then it looks OK...
-        */
-       case FR_EAP_RESPONSE:
+       if (eap_packet->code == FR_EAP_RESPONSE) {
                if (eap_packet->data[0] == FR_EAP_TLV) {
                        RDEBUG2("Received EAP-TLV response");
                        return 1;
                }
-               RDEBUG2("Got something weird");
-               break;
+       }
 
+       eap_method = *data;
+       switch (eap_method) {
+       case FR_EAP_IDENTITY:
+               RDEBUG2("Received EAP-Identity-Response");
+               return 1;
 
        /*
         *      We normally do Microsoft MS-CHAPv2 (26), versus