prepare handling of EAP-MD5 authentication
@@ -135,6 +135,7 @@ static long int eapcount;
static long int eapsimcount;
static long int eapakacount;
static long int eappeapcount;
+static long int eapmd5count;
static long int eapexpandedcount;
static long int eapreqidcount;
static long int eaprespidcount;
@@ -300,6 +301,7 @@ eapcount = 0;
eapsimcount = 0;
eapakacount = 0;
eappeapcount = 0;
+eapmd5count = 0;
eapexpandedcount = 0;
eapreqidcount = 0;
eaprespidcount = 0;
@@ -370,6 +372,7 @@ if(eapcount > 0) printf("EAP (total)............................: %ld\n", eapc
if(eapsimcount > 0) printf("EAP-SIM................................: %ld\n", eapsimcount);
if(eapakacount > 0) printf("EAP-AKA................................: %ld\n", eapakacount);
if(eappeapcount > 0) printf("EAP-PEAP...............................: %ld\n", eappeapcount);
+if(eapmd5count > 0) printf("EAP-MD5................................: %ld\n", eapmd5count);
if(eapexpandedcount > 0) printf("EAP-EXPANDED...........................: %ld\n", eapexpandedcount);
if(eapreqidcount > 0) printf("EAP REQUEST ID.........................: %ld\n", eapreqidcount);
if(eaprespidcount > 0) printf("EAP RESPONSE ID........................: %ld\n", eaprespidcount);
@@ -510,6 +513,22 @@ ipv6len = ipv6len;
return;
}
/*===========================================================================*/
+static void processeapmd5(uint8_t eapcode, uint32_t restlen, uint8_t *md5ptr)
+{
+static md5_t *md5;
+static uint32_t md5len;
+
+eapmd5count++;
+md5 = (md5_t*)md5ptr;
+md5len = ntohs(md5->len);
+if(md5len != restlen) return;
+if(eapcode == EAP_CODE_REQ) return;
+
+
+if(eapcode == EAP_CODE_RESP) return;
+return;
+}
+/*===========================================================================*/
static void hccap2base(unsigned char *in, unsigned char b)
{
static const char itoa64[64] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -1150,6 +1169,7 @@ if(exteap->type == EAP_TYPE_SIM) eapsimcount++;
else if(exteap->type == EAP_TYPE_AKA) eapakacount++;
else if(exteap->type == EAP_TYPE_PEAP) eappeapcount++;
else if(exteap->type == EAP_TYPE_EXPAND) eapexpandedcount++;
+else if(exteap->type == EAP_TYPE_MD5) processeapmd5(exteap->code, exteaplen, eapptr +EAPAUTH_SIZE);
if(exteap->code == EAP_CODE_REQ)
{
