Commit 38d7adc7 authored by Frédéric Leroy's avatar Frédéric Leroy

UE/*: fix ueid = 0

parent c7a36ec6
......@@ -440,7 +440,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
*/
emm_sap.primitive = EMMAS_DATA_REQ;
emm_sap.u.emm_as.u.data.guti = user->emm_data->guti;
emm_sap.u.emm_as.u.data.ueid = 0;
emm_sap.u.emm_as.u.data.ueid = user->ueid;
/* Setup EPS NAS security data */
emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx,
user->emm_data->security, FALSE, TRUE);
......
......@@ -304,7 +304,7 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
emm_sap_t emm_sap;
emm_sap.primitive = EMMAS_SECURITY_RES;
emm_sap.u.emm_as.u.security.guti = user->emm_data->guti;
emm_sap.u.emm_as.u.security.ueid = 0;
emm_sap.u.emm_as.u.security.ueid = user->ueid;
emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_AUTH;
emm_sap.u.emm_as.u.security.emm_cause = EMM_CAUSE_SUCCESS;
emm_sap.u.emm_as.u.security.res = &res;
......@@ -648,7 +648,7 @@ static int _authentication_abnormal_cases_cde(nas_user_t *user, int emm_cause,
emm_sap_t emm_sap;
emm_sap.primitive = EMMAS_SECURITY_RES;
emm_sap.u.emm_as.u.security.guti = user->emm_data->guti;
emm_sap.u.emm_as.u.security.ueid = 0;
emm_sap.u.emm_as.u.security.ueid = user->ueid;
emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_AUTH;
emm_sap.u.emm_as.u.security.emm_cause = emm_cause;
emm_sap.u.emm_as.u.security.auts = auts;
......
......@@ -151,7 +151,7 @@ int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, int switch_of
emm_as->switch_off = switch_off;
/* Set the EPS mobile identity */
emm_as->guti = user->emm_data->guti;
emm_as->ueid = 0;
emm_as->ueid = user->ueid;
/* Setup EPS NAS security data */
emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, FALSE, TRUE);
......@@ -402,7 +402,7 @@ void *emm_detach_t3421_handler(void *args)
emm_as->switch_off = emm_detach_data->switch_off;
/* Set the EPS mobile identity */
emm_as->guti = user->emm_data->guti;
emm_as->ueid = 0;
emm_as->ueid = user->ueid;
/* Setup EPS NAS security data */
emm_as_set_security_data(&emm_as->sctx, user->emm_data->security,
FALSE, TRUE);
......
......@@ -195,7 +195,7 @@ int emm_proc_identification_request(nas_user_t *user, emm_proc_identity_type_t t
*/
emm_sap.primitive = EMMAS_SECURITY_RES;
emm_sap.u.emm_as.u.security.guti = user->emm_data->guti;
emm_sap.u.emm_as.u.security.ueid = 0;
emm_sap.u.emm_as.u.security.ueid = user->ueid;
emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_IDENT;
/* Setup EPS NAS security data */
emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx,
......
......@@ -194,7 +194,7 @@ int emm_as_send(nas_user_t *user, const emm_as_t *msg)
int emm_cause = EMM_CAUSE_SUCCESS;
emm_as_primitive_t primitive = msg->primitive;
uint32_t ueid = 0;
uint32_t ueid = user->ueid;
LOG_TRACE(INFO, "EMMAS-SAP - Received primitive %s (%d)",
_emm_as_primitive_str[primitive - _EMMAS_START - 1], primitive);
......
......@@ -323,7 +323,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
emm_sap_t emm_sap;
emm_sap.primitive = EMMAS_SECURITY_RES;
emm_sap.u.emm_as.u.security.guti = user->emm_data->guti;
emm_sap.u.emm_as.u.security.ueid = 0;
emm_sap.u.emm_as.u.security.ueid = user->ueid;
emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_SMC;
emm_sap.u.emm_as.u.security.imeisv_request = imeisv_request;
emm_sap.u.emm_as.u.security.emm_cause = emm_cause;
......
......@@ -224,7 +224,7 @@ int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, int is_standa
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......@@ -292,7 +292,7 @@ int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, int is_standa
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -194,7 +194,7 @@ int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, int is_standalo
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......@@ -269,8 +269,7 @@ int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalo
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
// FIXME REVIEW
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -292,7 +292,7 @@ int esm_proc_eps_bearer_context_deactivate_accept(nas_user_t *user, int is_stand
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_sap.u.emm_esm.u.data.msg.length = msg->length;
emm_sap.u.emm_esm.u.data.msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -176,7 +176,7 @@ int esm_proc_status(nas_user_t *user, int is_standalone,
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_sap.u.emm_esm.u.data.msg.length = msg->length;
emm_sap.u.emm_esm.u.data.msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -296,7 +296,7 @@ int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int p
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......@@ -631,7 +631,7 @@ static void *_pdn_connectivity_t3482_handler(void *args)
* has to be sent again
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = data->msg.length;
emm_esm->msg.value = data->msg.value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -183,7 +183,7 @@ int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti
* Notity EMM that ESM PDU has to be forwarded to lower layers
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = msg->length;
emm_esm->msg.value = msg->value;
rc = emm_sap_send(user, &emm_sap);
......@@ -402,7 +402,7 @@ static void *_pdn_disconnect_t3492_handler(void *args)
* has to be sent again
*/
emm_sap.primitive = EMMESM_UNITDATA_REQ;
emm_sap.u.emm_esm.ueid = 0;
emm_sap.u.emm_esm.ueid = user->ueid;
emm_esm->msg.length = data->msg.length;
emm_esm->msg.value = data->msg.value;
rc = emm_sap_send(user, &emm_sap);
......
......@@ -1185,7 +1185,7 @@ int nas_proc_ul_transfer_cnf(nas_user_t *user)
* receiver side
*/
emm_sap.primitive = EMMAS_DATA_IND;
emm_sap.u.emm_as.u.data.ueid = 0;
emm_sap.u.emm_as.u.data.ueid = user->ueid;
emm_sap.u.emm_as.u.data.delivered = TRUE;
emm_sap.u.emm_as.u.data.NASmsg.length = 0;
rc = emm_sap_send(user, &emm_sap);
......@@ -1222,7 +1222,7 @@ int nas_proc_ul_transfer_rej(nas_user_t *user)
* from lower layers
*/
emm_sap.primitive = EMMAS_DATA_IND;
emm_sap.u.emm_as.u.data.ueid = 0;
emm_sap.u.emm_as.u.data.ueid = user->ueid;
emm_sap.u.emm_as.u.data.delivered = FALSE;
emm_sap.u.emm_as.u.data.NASmsg.length = 0;
rc = emm_sap_send(user, &emm_sap);
......@@ -1259,7 +1259,7 @@ int nas_proc_dl_transfer_ind(nas_user_t *user, const Byte_t *data, uint32_t len)
* indication has been received from the Access-Stratum sublayer
*/
emm_sap.primitive = EMMAS_DATA_IND;
emm_sap.u.emm_as.u.data.ueid = 0;
emm_sap.u.emm_as.u.data.ueid = user->ueid;
emm_sap.u.emm_as.u.data.delivered = TRUE;
emm_sap.u.emm_as.u.data.NASmsg.length = len;
emm_sap.u.emm_as.u.data.NASmsg.value = (uint8_t *)data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment