Set correct UE ID in Kenb Refresh Req
NAS triggered the Kenb Refresh Req always for (hardcoded) UE 0. This fixes this by setting the correct UE ID. An effect of this was that the Kenb would always be set for UE 0, regardless for which UE it was actually intended. This led for integrity check failures for every UE with ID > 0.
This commit is contained in:
@@ -286,7 +286,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
|
||||
user->emm_data->security->selected_algorithms.encryption = seea;
|
||||
user->emm_data->security->selected_algorithms.integrity = seia;
|
||||
#if defined(NAS_BUILT_IN_UE)
|
||||
nas_itti_kenb_refresh_req(security_data->kenb.value);
|
||||
nas_itti_kenb_refresh_req(security_data->kenb.value, user->ueid);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ int nas_itti_protected_msg(const char *buffer, const nas_message_t *msg, const i
|
||||
|
||||
extern unsigned char NB_eNB_INST;
|
||||
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]) {
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id) {
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_NAS_UE, NAS_KENB_REFRESH_REQ);
|
||||
memcpy(NAS_KENB_REFRESH_REQ(message_p).kenb, kenb, sizeof(NAS_KENB_REFRESH_REQ(message_p).kenb));
|
||||
@@ -125,7 +125,7 @@ int nas_itti_kenb_refresh_req(const Byte_t kenb[32]) {
|
||||
kenb[20], kenb[21], kenb[22], kenb[23],
|
||||
kenb[24], kenb[25], kenb[26], kenb[27],
|
||||
kenb[28], kenb[29], kenb[30], kenb[31]);
|
||||
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + 0 /* TODO to be virtualized */, message_p);
|
||||
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
|
||||
}
|
||||
|
||||
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id) {
|
||||
|
||||
@@ -48,7 +48,7 @@ int nas_itti_protected_msg(
|
||||
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]);
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id);
|
||||
|
||||
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user