Skip to content

Commit 3d93f64

Browse files
author
Juha Heiskanen
authored
Merge pull request #2053 from ARMmbed/ws_eapol_bootstrap
Ws eapol bootstrap
2 parents d29dfa7 + 7b55332 commit 3d93f64

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,6 @@ static void ws_bootstrap_pan_config_analyse(struct protocol_interface_info_entry
988988
ws_bs_ie_t ws_bs_ie;
989989
uint8_t *gtkhash_ptr;
990990

991-
992991
if (data->SrcPANId != cur->ws_info->network_pan_id) {
993992
tr_debug("Wrong PAN id r:%u own:%u", data->SrcPANId, cur->ws_info->network_pan_id);
994993
return;
@@ -1974,7 +1973,6 @@ static void ws_bootstrap_start_discovery(protocol_interface_info_entry_t *cur)
19741973
// Start authentication
19751974
static void ws_bootstrap_start_authentication(protocol_interface_info_entry_t *cur)
19761975
{
1977-
tr_debug("authentication start");
19781976
// Set PAN ID and network name to controller
19791977
ws_pae_controller_nw_info_set(cur, cur->ws_info->network_pan_id, cur->ws_info->network_name);
19801978

@@ -2538,7 +2536,12 @@ void ws_bootstrap_trickle_timer(protocol_interface_info_entry_t *cur, uint16_t t
25382536
// send PAN Configuration solicit
25392537
if (cur->ws_info->pas_requests > PCS_MAX) {
25402538
// if MAX PCS sent restart discovery
2539+
uint8_t empty_key[32];
2540+
memset(empty_key, 0, 32);
25412541
tr_debug("Restart???");
2542+
//Clear Key's
2543+
tr_debug("Remove not working GTK's");
2544+
ws_pae_controller_gtk_hash_update(cur, empty_key);
25422545
ws_bootstrap_event_discovery_start(cur);
25432546
return;
25442547
}

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ static void fhss_broadcast_handler(const fhss_api_t *fhss_api, uint16_t delay)
225225
if (fhss_structure->ws->fhss_configuration.fhss_bc_dwell_interval == 0 || fhss_structure->ws->fhss_configuration.fhss_broadcast_interval == 0) {
226226
// stop broadcast schedule
227227
fhss_structure->ws->is_on_bc_channel = false;
228+
fhss_structure->ws->synchronization_time = 0;
228229
return;
229230
}
230231
if (fhss_structure->ws->is_on_bc_channel == false) {
@@ -885,6 +886,10 @@ int fhss_ws_configuration_set(fhss_structure_t *fhss_structure, const fhss_ws_co
885886
fhss_stop_timer(fhss_structure, fhss_unicast_handler);
886887
fhss_structure->ws->unicast_timer_running = false;
887888
}
889+
if (fhss_configuration->ws_bc_channel_function == WS_FIXED_CHANNEL || (fhss_structure->ws->fhss_configuration.fhss_bc_dwell_interval == 0 || fhss_structure->ws->fhss_configuration.fhss_broadcast_interval == 0)) {
890+
fhss_structure->ws->synchronization_time = 0;
891+
}
892+
888893
if ((fhss_structure->ws->unicast_timer_running == false) && (fhss_configuration->ws_uc_channel_function != WS_FIXED_CHANNEL) && fhss_configuration->fhss_uc_dwell_interval) {
889894
fhss_ws_start_timer(fhss_structure, MS_TO_US(fhss_configuration->fhss_uc_dwell_interval), fhss_unicast_handler);
890895
fhss_structure->ws->unicast_timer_running = true;

0 commit comments

Comments
 (0)