diff --git a/source/6LoWPAN/ws/ws_bootstrap.c b/source/6LoWPAN/ws/ws_bootstrap.c index aa0edf0df3de..808acb7bf2c6 100644 --- a/source/6LoWPAN/ws/ws_bootstrap.c +++ b/source/6LoWPAN/ws/ws_bootstrap.c @@ -1597,7 +1597,11 @@ static void ws_bootstrap_pan_config_analyse(struct protocol_interface_info_entry tr_info("Updated PAN configuration own:%d, heard:%d", cur->ws_info->pan_information.pan_version, pan_version); // restart PAN version timer - cur->ws_info->pan_timeout_timer = cur->ws_info->cfg->timing.pan_timeout; + //Check Here Do we have a selected Primary parent + if (!cur->ws_info->configuration_learned || cur->ws_info->rpl_state == RPL_EVENT_DAO_DONE) { + cur->ws_info->pan_timeout_timer = cur->ws_info->cfg->timing.pan_timeout; + } + cur->ws_info->pan_information.pan_version = pan_version; ws_pae_controller_gtk_hash_update(cur, gtkhash_ptr); diff --git a/source/6LoWPAN/ws/ws_eapol_relay.c b/source/6LoWPAN/ws/ws_eapol_relay.c index a5a83c3ec3e4..0bc7a5a472e9 100644 --- a/source/6LoWPAN/ws/ws_eapol_relay.c +++ b/source/6LoWPAN/ws/ws_eapol_relay.c @@ -66,11 +66,14 @@ int8_t ws_eapol_relay_start(protocol_interface_info_entry_t *interface_ptr, uint return -1; } - if (ws_eapol_relay_get(interface_ptr)) { + eapol_relay_t *eapol_relay = ws_eapol_relay_get(interface_ptr); + + if (eapol_relay) { + memcpy(&eapol_relay->remote_addr.address, remote_addr, 16); return 0; } - eapol_relay_t *eapol_relay = ns_dyn_mem_alloc(sizeof(eapol_relay_t)); + eapol_relay = ns_dyn_mem_alloc(sizeof(eapol_relay_t)); if (!eapol_relay) { return -1; }