Merge remote-tracking branch 'origin/oaiUe_AuthReq_Fix' into integration_2022_wk18
This commit is contained in:
@@ -178,12 +178,15 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
|
|||||||
OctetString ik = {AUTH_IK_SIZE, authentication_data->ik};
|
OctetString ik = {AUTH_IK_SIZE, authentication_data->ik};
|
||||||
OctetString res = {AUTH_RES_SIZE, authentication_data->res};
|
OctetString res = {AUTH_RES_SIZE, authentication_data->res};
|
||||||
|
|
||||||
if (memcmp(authentication_data->rand, rand->value, AUTH_CK_SIZE) != 0) {
|
if ((memcmp(authentication_data->rand, rand->value, AUTH_CK_SIZE) != 0) ||
|
||||||
|
(authentication_data->auth_process_started == FALSE)) {
|
||||||
/*
|
/*
|
||||||
* There is no valid stored RAND in the ME or the stored RAND is
|
* There is no valid stored RAND in the ME or the stored RAND is
|
||||||
* different from the new received value in the AUTHENTICATION
|
* different from the new received value in the AUTHENTICATION
|
||||||
* REQUEST message
|
* REQUEST message OR if this is first time UE starting the
|
||||||
|
* Authentication process
|
||||||
*/
|
*/
|
||||||
|
authentication_data->auth_process_started = TRUE;
|
||||||
OctetString auts;
|
OctetString auts;
|
||||||
auts.length = 0;
|
auts.length = 0;
|
||||||
auts.value = (uint8_t *)malloc(AUTH_AUTS_SIZE);
|
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 mac_count:2; /* MAC failure counter (#20) */
|
||||||
unsigned char umts_count:2; /* UMTS challenge failure counter (#26) */
|
unsigned char umts_count:2; /* UMTS challenge failure counter (#26) */
|
||||||
unsigned char sync_count:2; /* Sync failure counter (#21) */
|
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;
|
} authentication_data_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user