improved detection of zeroed PMKIDs
@@ -1624,12 +1624,15 @@ memcpy(zeiger->nonce, wpak->nonce, 32);
if(authlen >= (int)(WPAKEY_SIZE +PMKID_SIZE))
{
pmkid = (pmkid_t*)(wpakptr +WPAKEY_SIZE);
- if((pmkid->len == 0x14) && (pmkid->type == 0x04) && (memcmp(&zeroed32, pmkid->pmkid, 16) != 0))
+ if((pmkid->len == 0x14) && (pmkid->type == 0x04))
{
zeiger->message |= HS_PMKID;
+ if(memcmp(&zeroed32, pmkid->pmkid, 16) != 0)
+ {
memcpy(zeiger->pmkid, pmkid->pmkid, 16);
addpmkid(macclient, macap, pmkid->pmkid);
}
+ }
else pmkiduselesscount++;
}
for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX +1; zeiger++)
@@ -1736,7 +1739,6 @@ clientinfoptr = reassociationrequestptr +CAPABILITIESREQSTA_SIZE;
clientinfolen = reassociationrequestlen -CAPABILITIESREQSTA_SIZE;
if(clientinfolen < (int)IETAG_SIZE) return;
gettags(clientinfolen, clientinfoptr, &tags);
-if(memcmp(&tags.pmkid, &zeroed32, 16) != 0) addpmkid(macclient, macap, tags.pmkid);
if(aplistptr >= aplist +maclistmax)
{
aplistnew = realloc(aplist, (maclistmax +MACLIST_MAX) *MACLIST_SIZE);
@@ -1768,7 +1770,6 @@ else if(((tags.akm &TAK_PSK) == TAK_PSK) || ((tags.akm &TAK_PSKSHA256) == TAK_PS
{
if(memcmp(&zeroed32, tags.pmkid, 16) != 0) addpmkid(macclient, macap, tags.pmkid);
}
-addpmkid(macclient, macap, tags.pmkid);
if(cleanbackmac() == false) aplistptr++;
if(aplistptr >= aplist +maclistmax)
{
