Skip to content

Commit eef9246

Browse files
author
Juha Heiskanen
committed
Fixed network border router timeout recovery and EAPOL relay address fix
Border router timeout timer is updated only when DAO ack is received.
1 parent bac7ca6 commit eef9246

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,11 @@ static void ws_bootstrap_pan_config_analyse(struct protocol_interface_info_entry
15971597
tr_info("Updated PAN configuration own:%d, heard:%d", cur->ws_info->pan_information.pan_version, pan_version);
15981598

15991599
// restart PAN version timer
1600-
cur->ws_info->pan_timeout_timer = cur->ws_info->cfg->timing.pan_timeout;
1600+
//Check Here Do we have a selected Primary parent
1601+
if (!cur->ws_info->configuration_learned || cur->ws_info->rpl_state == RPL_EVENT_DAO_DONE) {
1602+
cur->ws_info->pan_timeout_timer = cur->ws_info->cfg->timing.pan_timeout;
1603+
}
1604+
16011605
cur->ws_info->pan_information.pan_version = pan_version;
16021606

16031607
ws_pae_controller_gtk_hash_update(cur, gtkhash_ptr);

source/6LoWPAN/ws/ws_eapol_relay.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ int8_t ws_eapol_relay_start(protocol_interface_info_entry_t *interface_ptr, uint
6666
return -1;
6767
}
6868

69-
if (ws_eapol_relay_get(interface_ptr)) {
69+
eapol_relay_t *eapol_relay = ws_eapol_relay_get(interface_ptr);
70+
71+
if (eapol_relay) {
72+
memcpy(&eapol_relay->remote_addr.address, remote_addr, 16);
7073
return 0;
7174
}
7275

73-
eapol_relay_t *eapol_relay = ns_dyn_mem_alloc(sizeof(eapol_relay_t));
76+
eapol_relay = ns_dyn_mem_alloc(sizeof(eapol_relay_t));
7477
if (!eapol_relay) {
7578
return -1;
7679
}

0 commit comments

Comments
 (0)