Skip to content

Commit 0396b97

Browse files
author
Juha Heiskanen
committed
Revert EAPOL simplify failure handling and focus this problem later on.
1 parent b2fe3d4 commit 0396b97

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,13 +2727,9 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
27272727
if (result == AUTH_RESULT_OK) {
27282728
tr_debug("authentication success");
27292729
ws_bootstrap_event_configuration_start(cur);
2730-
} else {
2730+
} else if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
27312731
// eapol parent selected is not working
2732-
if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
2733-
tr_debug("authentication TX failed");
2734-
} else {
2735-
tr_debug("authentication failed");
2736-
}
2732+
tr_debug("authentication TX failed");
27372733

27382734
ws_bootstrap_candidate_parent_free(cur, target_eui_64);
27392735
// Go back for network scanning
@@ -2746,6 +2742,12 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
27462742
// Parent selection is made before imin/2 so if there is parent candidates solicit is not sent
27472743
cur->bootsrap_state_machine_cnt = randLIB_get_random_in_range(10, cur->ws_info->trickle_params_pan_discovery.Imin >> 1);
27482744
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
2745+
} else {
2746+
tr_debug("authentication failed");
2747+
// What else to do to start over again...
2748+
// Trickle is reseted when entering to discovery from state 2
2749+
trickle_inconsistent_heard(&cur->ws_info->trickle_pan_advertisement_solicit, &cur->ws_info->trickle_params_pan_discovery);
2750+
ws_bootstrap_event_discovery_start(cur);
27492751
}
27502752
}
27512753

0 commit comments

Comments
 (0)