Skip to content

Commit

Permalink
EAPOL failure simplify and EAPOL relay agent add trace when eapol tem…
Browse files Browse the repository at this point in the history
…p 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.
  • Loading branch information
Juha Heiskanen committed Apr 27, 2020
1 parent 6667b31 commit ff1ca25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
14 changes: 6 additions & 8 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2700,9 +2700,13 @@ static void ws_bootstrap_authentication_completed(protocol_interface_info_entry_
if (result == AUTH_RESULT_OK) {
tr_debug("authentication success");
ws_bootstrap_event_configuration_start(cur);
} else if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
} else {
// eapol parent selected is not working
tr_debug("authentication TX failed");
if (result == AUTH_RESULT_ERR_TX_NO_ACK) {
tr_debug("authentication TX failed");
} else {
tr_debug("authentication failed");
}

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

Expand Down
1 change: 1 addition & 0 deletions source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ static void ws_llc_eapol_indication_cb(const mac_api_t *api, const mcps_data_ind
//Allocate temporary entry
ws_neighbor_temp_class_t *temp_entry = ws_allocate_eapol_temp_entry(base->temp_entries, data->SrcAddr);
if (!temp_entry) {
tr_warn("EAPOL temp pool empty");
return;
}
//Update Temporary Lifetime
Expand Down

0 comments on commit ff1ca25

Please sign in to comment.