aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crypt/dot11decrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/crypt/dot11decrypt.c')
-rw-r--r--epan/crypt/dot11decrypt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/crypt/dot11decrypt.c b/epan/crypt/dot11decrypt.c
index 6e028654f8..a9908c1dba 100644
--- a/epan/crypt/dot11decrypt.c
+++ b/epan/crypt/dot11decrypt.c
@@ -984,13 +984,12 @@ INT Dot11DecryptPacketProcess(
} else {
DOT11DECRYPT_DEBUG_PRINT_LINE("Dot11DecryptPacketProcess", "TKIP or CCMP encryption", DOT11DECRYPT_DEBUG_LEVEL_3);
- /* If index >= 1, then use the group key. This will not work if the AP is using
+ /* If the destination is a multicast address use the group key. This will not work if the AP is using
more than one group key simultaneously. I've not seen this in practice, however.
Usually an AP will rotate between the two key index values of 1 and 2 whenever
it needs to change the group key to be used. */
- if (DOT11DECRYPT_KEY_INDEX(data[offset+3])>=1){
-
- DOT11DECRYPT_DEBUG_PRINT_LINE("Dot11DecryptPacketProcess", "The key index >= 1. This is encrypted with a group key.", DOT11DECRYPT_DEBUG_LEVEL_3);
+ if (((const DOT11DECRYPT_MAC_FRAME_ADDR4 *)(data))->addr1[0] & 0x01) {
+ DOT11DECRYPT_DEBUG_PRINT_LINE("Dot11DecryptPacketProcess", "Broadcast/Multicast address. This is encrypted with a group key.", DOT11DECRYPT_DEBUG_LEVEL_3);
/* force STA address to broadcast MAC so we load the SA for the groupkey */
memcpy(id.sta, broadcast_mac, DOT11DECRYPT_MAC_LEN);