Skip to content

Commit 47b2e03

Browse files
author
Mika Leppänen
committed
Corrected GKH initiation on supplicant
Creates now always instance for GTK if previous instance is terminating. This enables handling repeated GTK sets for different keys (up to three keys migth be set). This also works for repeated messages (same message counter). They are routed to created instance and ignored. Instance clears when it timeouts. If valid message is received, it is handled by instance and replied normally.
1 parent c83423a commit 47b2e03

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/6LoWPAN/ws/ws_pae_supp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,13 @@ static kmp_api_t *ws_pae_supp_kmp_incoming_ind(kmp_service_t *service, kmp_type_
10111011

10121012
// Check if ongoing
10131013
kmp_api_t *kmp = ws_pae_lib_kmp_list_type_get(&pae_supp->entry.kmp_list, type);
1014-
if (kmp) {
1014+
/* If kmp receiving is enabled or it is not GKH, routes message to existing KMP.
1015+
1016+
For GKH creates an instance to handle message. If message is not valid (e.g. repeated
1017+
message counter), GKH ignores message and waits for timeout. All further messages
1018+
are routed to that instance. If valid message arrives, GKH instance handles the
1019+
message, replies to authenticator and terminates. */
1020+
if (kmp && (!kmp_api_receive_disable(kmp) || type != IEEE_802_11_GKH)) {
10151021
return kmp;
10161022
}
10171023

0 commit comments

Comments
 (0)