Skip to content

Commit ff1ca25

Browse files
author
Juha Heiskanen
committed
EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
EAPOL authentication failure is now working like at link failure case. Failure will remove entry from list and do Target selection again.
1 parent 6667b31 commit ff1ca25

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,9 +2700,13 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
27002700
if (result == AUTH_RESULT_OK) {
27012701
tr_debug("authentication success");
27022702
ws_bootstrap_event_configuration_start(cur);
2703-
} else if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
2703+
} else {
27042704
// eapol parent selected is not working
2705-
tr_debug("authentication TX failed");
2705+
if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
2706+
tr_debug("authentication TX failed");
2707+
} else {
2708+
tr_debug("authentication failed");
2709+
}
27062710

27072711
ws_bootstrap_candidate_parent_free(cur, target_eui_64);
27082712
// Go back for network scanning
@@ -2715,12 +2719,6 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
27152719
// Parent selection is made before imin/2 so if there is parent candidates solicit is not sent
27162720
cur->bootsrap_state_machine_cnt = randLIB_get_random_in_range(10, cur->ws_info->trickle_params_pan_discovery.Imin >> 1);
27172721
tr_info("Making parent selection in %u s", (cur->bootsrap_state_machine_cnt / 10));
2718-
} else {
2719-
tr_debug("authentication failed");
2720-
// What else to do to start over again...
2721-
// Trickle is reseted when entering to discovery from state 2
2722-
trickle_inconsistent_heard(&cur->ws_info->trickle_pan_advertisement_solicit, &cur->ws_info->trickle_params_pan_discovery);
2723-
ws_bootstrap_event_discovery_start(cur);
27242722
}
27252723
}
27262724

source/6LoWPAN/ws/ws_llc_data_service.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ static void ws_llc_eapol_indication_cb(const mac_api_t *api, const mcps_data_ind
736736
//Allocate temporary entry
737737
ws_neighbor_temp_class_t *temp_entry = ws_allocate_eapol_temp_entry(base->temp_entries, data->SrcAddr);
738738
if (!temp_entry) {
739+
tr_warn("EAPOL temp pool empty");
739740
return;
740741
}
741742
//Update Temporary Lifetime

0 commit comments

Comments
 (0)