Skip to content

Commit

Permalink
Fixed network border router timeout recovery and EAPOL relay address fix
Browse files Browse the repository at this point in the history
Border router timeout timer is updated only when DAO ack is received.
  • Loading branch information
Juha Heiskanen committed Sep 4, 2020
1 parent bac7ca6 commit eef9246
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions source/6LoWPAN/ws/ws_eapol_relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit eef9246

Please sign in to comment.