** new procedure - refresh kENB from NAS -> AS **
added flow to refresh KeNB key in RRC on receiving S1AP-InitialContextSetup added flow to configure PDCP security mode enabled filling in the PDCP MAC code during and after RRC-SMC procedure (cherry picked from commit 898cd5c45aedb27625d73352568211b4467c8dd9)
This commit is contained in:
@@ -116,6 +116,15 @@ Description Defines the messages supported by the Access Stratum sublayer
|
||||
#define AS_HSDUPA (1 << NET_ACCESS_HSDUPA)
|
||||
#define AS_EUTRAN (1 << NET_ACCESS_EUTRAN)
|
||||
|
||||
/*
|
||||
* NAS->AS -K_eNB refresh request
|
||||
* NAS request AS to refresh its KeNB key
|
||||
*/
|
||||
typedef struct kenb_refresh_req_s {
|
||||
Byte_t kenb[32];
|
||||
} kenb_refresh_req_t;
|
||||
|
||||
#if 1 // wilson 2016-05-02 add new message to update kenb in RRC after NAS SMC complete
|
||||
/*
|
||||
* NAS->AS - Cell Information request
|
||||
* NAS request AS to search for a suitable cell belonging to the selected
|
||||
@@ -125,6 +134,7 @@ typedef struct {
|
||||
plmn_t plmnID; /* PLMN identifier */
|
||||
Byte_t rat; /* Bitmap - set of radio access technologies */
|
||||
} cell_info_req_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* AS->NAS - Cell Information response
|
||||
|
||||
@@ -72,6 +72,8 @@ Description Defines the security mode control EMM procedure executed by the
|
||||
#include "secu_defs.h"
|
||||
#include "msc.h"
|
||||
|
||||
#include "nas_itti_messaging.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/**************** E X T E R N A L D E F I N I T I O N S ****************/
|
||||
/****************************************************************************/
|
||||
@@ -293,7 +295,9 @@ int emm_proc_security_mode_command(int native_ksi, int ksi,
|
||||
|
||||
_emm_data.security->selected_algorithms.encryption = seea;
|
||||
_emm_data.security->selected_algorithms.integrity = seia;
|
||||
|
||||
#if 1 // wilson 2016-05-02 add new message to update kenb in RRC after NAS SMC complete
|
||||
nas_itti_kenb_refresh_req(_security_data.kenb.value);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
* NAS security mode command not accepted by the UE
|
||||
|
||||
@@ -187,6 +187,41 @@ int nas_itti_protected_msg(const char *buffer, const nas_message_t *msg, const i
|
||||
|
||||
extern unsigned char NB_eNB_INST;
|
||||
|
||||
#if 1 // wilson 2016-05-02 add new message to update kenb in RRC after NAS SMC complete
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32])
|
||||
{
|
||||
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));
|
||||
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_NAS_UE,
|
||||
MSC_RRC_UE,
|
||||
NULL,0,
|
||||
"0 NAS_KENB_REFRESH_REQ KeNB "
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x",
|
||||
kenb[0], kenb[1], kenb[2], kenb[3],
|
||||
kenb[4], kenb[5], kenb[6], kenb[7],
|
||||
kenb[8], kenb[9], kenb[10], kenb[11],
|
||||
kenb[12], kenb[13], kenb[14], kenb[15],
|
||||
kenb[16], kenb[17], kenb[18], kenb[19],
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
|
||||
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
|
||||
@@ -54,6 +54,11 @@ int nas_itti_protected_msg(
|
||||
|
||||
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
|
||||
#if 1 // wilson 2016-05-02 add new message to update kenb in RRC after NAS SMC complete
|
||||
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]);
|
||||
#endif
|
||||
|
||||
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat);
|
||||
|
||||
int nas_itti_nas_establish_req(as_cause_t cause, as_call_type_t type, as_stmsi_t s_tmsi, plmn_t plmnID, Byte_t *data_pP, uint32_t lengthP);
|
||||
|
||||
Reference in New Issue
Block a user