Skip to content

Commit

Permalink
PAN Configuration failure fix and enabler
Browse files Browse the repository at this point in the history
If Bootstrap phase that PCS_MAX is reached at configure discovery state we now removing not working key's.

Change-Id: I902041c6bfab3b56d1c7e39de53f962849ccb70f
  • Loading branch information
Juha Heiskanen committed Apr 4, 2019
1 parent 1a798ab commit 7b55332
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,6 @@ static void ws_bootstrap_pan_config_analyse(struct protocol_interface_info_entry
ws_bs_ie_t ws_bs_ie;
uint8_t *gtkhash_ptr;


if (data->SrcPANId != cur->ws_info->network_pan_id) {
tr_debug("Wrong PAN id r:%u own:%u", data->SrcPANId, cur->ws_info->network_pan_id);
return;
Expand Down Expand Up @@ -1974,7 +1973,6 @@ static void ws_bootstrap_start_discovery(protocol_interface_info_entry_t *cur)
// Start authentication
static void ws_bootstrap_start_authentication(protocol_interface_info_entry_t *cur)
{
tr_debug("authentication start");
// Set PAN ID and network name to controller
ws_pae_controller_nw_info_set(cur, cur->ws_info->network_pan_id, cur->ws_info->network_name);

Expand Down Expand Up @@ -2538,7 +2536,12 @@ void ws_bootstrap_trickle_timer(protocol_interface_info_entry_t *cur, uint16_t t
// send PAN Configuration solicit
if (cur->ws_info->pas_requests > PCS_MAX) {
// if MAX PCS sent restart discovery
uint8_t empty_key[32];
memset(empty_key, 0, 32);
tr_debug("Restart???");
//Clear Key's
tr_debug("Remove not working GTK's");
ws_pae_controller_gtk_hash_update(cur, empty_key);
ws_bootstrap_event_discovery_start(cur);
return;
}
Expand Down

0 comments on commit 7b55332

Please sign in to comment.