Skip to content

Commit b2fe3d4

Browse files
author
Mika Leppänen
committed
Ignoring authentication failure if security protocol already started
On supplicant, if initial-EAPOL key fails to TX failure, but authenticator has already started security protocol (e.g. EAP-TLS), do not indicate authenticaton failure to bootstrap.
1 parent 11de56d commit b2fe3d4

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

source/6LoWPAN/ws/ws_pae_lib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ bool ws_pae_lib_kmp_list_empty(kmp_list_t *kmp_list)
132132
return ns_list_is_empty(kmp_list);
133133
}
134134

135+
uint8_t ws_pae_lib_kmp_list_count(kmp_list_t *kmp_list)
136+
{
137+
return ns_list_count(kmp_list);
138+
}
139+
135140
void ws_pae_lib_kmp_timer_start(kmp_list_t *kmp_list, kmp_entry_t *entry)
136141
{
137142
if (ns_list_get_first(kmp_list) != entry) {

source/6LoWPAN/ws/ws_pae_lib.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ kmp_entry_t *ws_pae_lib_kmp_list_entry_get(kmp_list_t *kmp_list, kmp_api_t *kmp)
135135
*/
136136
bool ws_pae_lib_kmp_list_empty(kmp_list_t *kmp_list);
137137

138+
/**
139+
* ws_pae_lib_kmp_list_count counts entries on KMP list
140+
*
141+
* \param kmp_list KMP list
142+
*
143+
* \return count of entries on the list
144+
*
145+
*/
146+
uint8_t ws_pae_lib_kmp_list_count(kmp_list_t *kmp_list);
147+
138148
/**
139149
* ws_pae_lib_kmp_timer_start starts KMP timer
140150
*

source/6LoWPAN/ws/ws_pae_supp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,11 @@ static void ws_pae_supp_kmp_api_finished_indication(kmp_api_t *kmp, kmp_result_e
12201220
that bootstrap can decide if EAPOL target should be changed */
12211221
else if (type > IEEE_802_1X_INITIAL_KEY && result == KMP_RESULT_ERR_TX_NO_ACK) {
12221222
tr_info("Initial EAPOL-Key TX failure, target: %s", trace_array(kmp_address_eui_64_get(&pae_supp->entry.addr), 8));
1223-
ws_pae_supp_authenticate_response(pae_supp, AUTH_RESULT_ERR_TX_NO_ACK);
1223+
/* Fails authentication only if other authentication protocols are not yet
1224+
started by authenticator */
1225+
if (ws_pae_lib_kmp_list_count(&pae_supp->entry.kmp_list) <= 1) {
1226+
ws_pae_supp_authenticate_response(pae_supp, AUTH_RESULT_ERR_TX_NO_ACK);
1227+
}
12241228
}
12251229
}
12261230

0 commit comments

Comments
 (0)