improved endianess detection of router
@@ -14,7 +14,7 @@ hccapx.version = HCCAPX_VERSION;
hccapx.message_pair = 0x80;
if((zeiger->keyinfo_ap == 1) && (zeiger->keyinfo_sta == 4))
{
- hccapx.message_pair = MESSAGE_PAIR_M12E2 | zeiger->endianess;
+ hccapx.message_pair = MESSAGE_PAIR_M12E2;
if(zeiger->replaycount_ap != zeiger->replaycount_sta)
{
hccapx.message_pair |= 0x80;
@@ -22,7 +22,7 @@ if((zeiger->keyinfo_ap == 1) && (zeiger->keyinfo_sta == 4))
}
else if((zeiger->keyinfo_ap == 2) && (zeiger->keyinfo_sta == 4))
{
- hccapx.message_pair = MESSAGE_PAIR_M32E2 | zeiger->endianess;
+ hccapx.message_pair = MESSAGE_PAIR_M32E2;
if(zeiger->replaycount_ap -1 != zeiger->replaycount_sta)
{
hccapx.message_pair |= 0x80;
@@ -30,7 +30,7 @@ else if((zeiger->keyinfo_ap == 2) && (zeiger->keyinfo_sta == 4))
}
else if((zeiger->keyinfo_ap == 1) && (zeiger->keyinfo_sta == 8))
{
- hccapx.message_pair = MESSAGE_PAIR_M14E4 | zeiger->endianess;
+ hccapx.message_pair = MESSAGE_PAIR_M14E4;
if(zeiger->replaycount_ap +1 != zeiger->replaycount_sta)
{
hccapx.message_pair |= 0x80;
@@ -38,12 +38,13 @@ else if((zeiger->keyinfo_ap == 1) && (zeiger->keyinfo_sta == 8))
}
else if((zeiger->keyinfo_ap == 2) && (zeiger->keyinfo_sta == 8))
{
- hccapx.message_pair = MESSAGE_PAIR_M34E4 | zeiger->endianess;
+ hccapx.message_pair = MESSAGE_PAIR_M34E4;
if(zeiger->replaycount_ap != zeiger->replaycount_sta)
{
hccapx.message_pair |= 0x80;
}
}
+hccapx.message_pair |= zeiger->endianess;
wpak = (wpakey_t*)(zeiger->eapol +EAPAUTH_SIZE);
hccapx.essid_len = zeiger->essidlen;
memcpy(&hccapx.essid, zeiger->essid, 32);
