Skip to content

Commit

Permalink
Corrected GKH initiation on supplicant
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mika Leppänen committed Sep 25, 2019
1 parent c83423a commit 47b2e03
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/6LoWPAN/ws/ws_pae_supp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,13 @@ static kmp_api_t *ws_pae_supp_kmp_incoming_ind(kmp_service_t *service, kmp_type_

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

Expand Down

0 comments on commit 47b2e03

Please sign in to comment.