Skip to content
Snippets Groups Projects
Commit a8f879ea authored by Vijaykumar Chadachan's avatar Vijaykumar Chadachan
Browse files

Update for the code review comment.

Instead of NULL RAND value check, added the flag to indicate if the
AUTH process started. The flag is used manage the timer handling
for authentication process when stored RAND values is same as received
RAND value in AUTH_REQ.
parent 05567b59
No related branches found
No related tags found
3 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1545integration_2022_wk18,!1537Fix for OAI UE AUTH_REQ processing additional check for RAND value
......@@ -180,13 +180,14 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
OctetString res = {AUTH_RES_SIZE, authentication_data->res};
if ((memcmp(authentication_data->rand, rand->value, AUTH_CK_SIZE) != 0) ||
(memcmp(nullRand,authentication_data->rand, AUTH_CK_SIZE) == 0)) {
(authentication_data->auth_process_started == FALSE)) {
/*
* There is no valid stored RAND in the ME or the stored RAND is
* different from the new received value in the AUTHENTICATION
* REQUEST message OR the received RAND is all "0" or "NULL"
* process the new received AUTHENTICATIOn REQUEST message
* REQUEST message OR if this is first time UE starting the
* Authentication process
*/
authentication_data->auth_process_started = TRUE;
OctetString auts;
auts.length = 0;
auts.value = (uint8_t *)malloc(AUTH_AUTS_SIZE);
......
......@@ -18,6 +18,8 @@ typedef struct {
unsigned char mac_count:2; /* MAC failure counter (#20) */
unsigned char umts_count:2; /* UMTS challenge failure counter (#26) */
unsigned char sync_count:2; /* Sync failure counter (#21) */
unsigned char auth_process_started:1; /* Authentication started */
unsigned char reserve:1; /* For future use, byte aligned */
} authentication_data_t;
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment