@@ -2727,13 +2727,9 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
2727
2727
if (result == AUTH_RESULT_OK ) {
2728
2728
tr_debug ("authentication success" );
2729
2729
ws_bootstrap_event_configuration_start (cur );
2730
- } else {
2730
+ } else if ( result == AUTH_RESULT_ERR_TX_NO_ACK ) {
2731
2731
// 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" );
2737
2733
2738
2734
ws_bootstrap_candidate_parent_free (cur , target_eui_64 );
2739
2735
// Go back for network scanning
@@ -2746,6 +2742,12 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
2746
2742
// Parent selection is made before imin/2 so if there is parent candidates solicit is not sent
2747
2743
cur -> bootsrap_state_machine_cnt = randLIB_get_random_in_range (10 , cur -> ws_info -> trickle_params_pan_discovery .Imin >> 1 );
2748
2744
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 );
2749
2751
}
2750
2752
}
2751
2753
0 commit comments