Commit 8a11e8dd authored by Raymond Knopp's avatar Raymond Knopp

protection of RLC configuration in case of CU

parent eacd1cfb
...@@ -507,6 +507,8 @@ init_MCCH( ...@@ -507,6 +507,8 @@ init_MCCH(
int sync_area = 0; int sync_area = 0;
// initialize RRC_eNB_INST MCCH entry // initialize RRC_eNB_INST MCCH entry
eNB_RRC_INST *rrc = RC.rrc[enb_mod_idP];
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE = RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t*)); malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t*));
...@@ -551,6 +553,7 @@ init_MCCH( ...@@ -551,6 +553,7 @@ init_MCCH(
// LOG_I(RRC, "DUY: serviceID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->tmgi_r9.serviceId_r9.buf[2]); // LOG_I(RRC, "DUY: serviceID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->tmgi_r9.serviceId_r9.buf[2]);
// LOG_I(RRC, "DUY: session ID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->sessionId_r9->buf[0]); // LOG_I(RRC, "DUY: session ID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->sessionId_r9->buf[0]);
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB(enb_mod_idP, CC_id, rrc_mac_config_req_eNB(enb_mod_idP, CC_id,
0,0,0,0,0, 0,0,0,0,0,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...@@ -587,7 +590,7 @@ init_MCCH( ...@@ -587,7 +590,7 @@ init_MCCH(
(SystemInformationBlockType1_v1310_IEs_t *)NULL (SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
}
//LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9); //LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9);
} }
...@@ -622,6 +625,9 @@ static void init_MBMS( ...@@ -622,6 +625,9 @@ static void init_MBMS(
#endif #endif
,NULL); ,NULL);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
rrc_rlc_config_asn1_req(&ctxt, rrc_rlc_config_asn1_req(&ctxt,
NULL, // SRB_ToAddModList NULL, // SRB_ToAddModList
NULL, // DRB_ToAddModList NULL, // DRB_ToAddModList
...@@ -632,7 +638,7 @@ static void init_MBMS( ...@@ -632,7 +638,7 @@ static void init_MBMS(
,0, 0 ,0, 0
#endif #endif
); );
}
//rrc_mac_config_req(); //rrc_mac_config_req();
} }
} }
...@@ -1330,6 +1336,7 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1330,6 +1336,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n", PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB(ctxt_pP->module_id, rrc_mac_config_req_eNB(ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
0,0,0,0,0, 0,0,0,0,0,
...@@ -1363,6 +1370,7 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1363,6 +1370,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
,(SystemInformationBlockType1_v1310_IEs_t *)NULL ,(SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
}
break; break;
} }
} }
...@@ -4772,12 +4780,13 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -4772,12 +4780,13 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
LOG_D(RRC, LOG_D(RRC,
"handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 UE %x) --->][MAC_eNB][MOD %02d][]\n", "handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 UE %x) --->][MAC_eNB][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ctxt_pP->module_id); ctxt_pP->frame, ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ctxt_pP->module_id);
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
0,0,0,0,0, 0,0,0,0,0,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0, 0,
#endif #endif
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
...@@ -4810,7 +4819,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -4810,7 +4819,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
(SystemInformationBlockType1_v1310_IEs_t *)NULL (SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
}
// Configure target eNB SRB2 // Configure target eNB SRB2
/// SRB2 /// SRB2
SRB2_config = CALLOC(1, sizeof(*SRB2_config)); SRB2_config = CALLOC(1, sizeof(*SRB2_config));
...@@ -5290,7 +5299,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -5290,7 +5299,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
, (PMCH_InfoList_r9_t *) NULL , (PMCH_InfoList_r9_t *) NULL
#endif #endif
,NULL); ,NULL);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
rrc_rlc_config_asn1_req(&ctxt, rrc_rlc_config_asn1_req(&ctxt,
ue_context_pP->ue_context.SRB_configList, ue_context_pP->ue_context.SRB_configList,
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL (DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
...@@ -5299,7 +5310,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -5299,7 +5310,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
, 0, 0 , 0, 0
#endif #endif
); );
}
/* Initialize NAS list */ /* Initialize NAS list */
dedicatedInfoNASList = NULL; dedicatedInfoNASList = NULL;
...@@ -5360,6 +5371,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -5360,6 +5371,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
//rrc_rlc_data_req(ctxt_pP->module_id,frameP, 1,(ue_mod_idP*NB_RB_MAX)+DCCH,rrc_eNB_mui++,0,size,(char*)buffer); //rrc_rlc_data_req(ctxt_pP->module_id,frameP, 1,(ue_mod_idP*NB_RB_MAX)+DCCH,rrc_eNB_mui++,0,size,(char*)buffer);
//pdcp_data_req (ctxt_pP->module_id, frameP, 1, (ue_mod_idP * NB_RB_MAX) + DCCH,rrc_eNB_mui++, 0, size, (char *) buffer, 1); //pdcp_data_req (ctxt_pP->module_id, frameP, 1, (ue_mod_idP * NB_RB_MAX) + DCCH,rrc_eNB_mui++, 0, size, (char *) buffer, 1);
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
...@@ -5394,7 +5406,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -5394,7 +5406,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
(SystemInformationBlockType1_v1310_IEs_t *)NULL (SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
}
/* /*
handoverCommand.criticalExtensions.present = HandoverCommand__criticalExtensions_PR_c1; handoverCommand.criticalExtensions.present = HandoverCommand__criticalExtensions_PR_c1;
handoverCommand.criticalExtensions.choice.c1.present = HandoverCommand__criticalExtensions__c1_PR_handoverCommand_r8; handoverCommand.criticalExtensions.choice.c1.present = HandoverCommand__criticalExtensions__c1_PR_handoverCommand_r8;
...@@ -5518,19 +5530,22 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5518,19 +5530,22 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
, (PMCH_InfoList_r9_t *) NULL , (PMCH_InfoList_r9_t *) NULL
#endif #endif
,NULL); ,NULL);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
// Refresh SRBs/DRBs // Refresh SRBs/DRBs
rrc_rlc_config_asn1_req( rrc_rlc_config_asn1_req(
ctxt_pP, ctxt_pP,
SRB_configList, // NULL, //LG-RK 14/05/2014 SRB_configList, SRB_configList, // NULL, //LG-RK 14/05/2014 SRB_configList,
DRB_configList, DRB_configList,
// (DRB_ToReleaseList_t *) NULL // (DRB_ToReleaseList_t *) NULL
DRB_Release_configList2 DRB_Release_configList2
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, (PMCH_InfoList_r9_t *) NULL , (PMCH_InfoList_r9_t *) NULL
, 0, 0 , 0, 0
#endif #endif
); );
}
// set the SRB active in Ue context // set the SRB active in Ue context
if (SRB_configList != NULL) { if (SRB_configList != NULL) {
for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) { for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) {
...@@ -5632,6 +5647,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5632,6 +5647,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity; DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
} }
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
...@@ -5667,7 +5683,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5667,7 +5683,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
(SystemInformationBlockType1_v1310_IEs_t *)NULL (SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
}
} else { // remove LCHAN from MAC/PHY } else { // remove LCHAN from MAC/PHY
if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) { if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) {
...@@ -5675,6 +5691,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5675,6 +5691,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
/* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE, /* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE,
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE); (ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
*/ */
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
rrc_rlc_config_req( rrc_rlc_config_req(
ctxt_pP, ctxt_pP,
SRB_FLAG_NO, SRB_FLAG_NO,
...@@ -5683,11 +5702,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5683,11 +5702,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
DRB2LCHAN[i], DRB2LCHAN[i],
Rlc_info_um); Rlc_info_um);
} }
}
ue_context_pP->ue_context.DRB_active[drb_id] = 0; ue_context_pP->ue_context.DRB_active[drb_id] = 0;
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n", PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB(ctxt_pP->module_id, rrc_mac_config_req_eNB(ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
0,0,0,0,0, 0,0,0,0,0,
...@@ -5725,6 +5746,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5725,6 +5746,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
} }
} }
} }
}
free(DRB_configList); free(DRB_configList);
ue_context_pP->ue_context.DRB_configList2[xid] = NULL; ue_context_pP->ue_context.DRB_configList2[xid] = NULL;
} }
...@@ -5830,6 +5852,7 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -5830,6 +5852,7 @@ rrc_eNB_generate_RRCConnectionSetup(
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n", PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (rrc->node_type == ngran_eNB) {
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
...@@ -5868,6 +5891,7 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -5868,6 +5891,7 @@ rrc_eNB_generate_RRCConnectionSetup(
} }
} }
} }
}
break; break;
default : default :
LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type); LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
...@@ -6343,7 +6367,9 @@ rrc_eNB_decode_ccch( ...@@ -6343,7 +6367,9 @@ rrc_eNB_decode_ccch(
#endif #endif
,NULL); ,NULL);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
rrc_rlc_config_asn1_req(ctxt_pP, rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList, ue_context_p->ue_context.SRB_configList,
(DRB_ToAddModList_t*) NULL, (DRB_ToAddModList_t*) NULL,
...@@ -6353,6 +6379,8 @@ rrc_eNB_decode_ccch( ...@@ -6353,6 +6379,8 @@ rrc_eNB_decode_ccch(
0,0 0,0
# endif # endif
); );
}
#endif //NO_RRM #endif //NO_RRM
} }
break; break;
...@@ -6415,7 +6443,16 @@ rrc_eNB_decode_ccch( ...@@ -6415,7 +6443,16 @@ rrc_eNB_decode_ccch(
random_value = (((uint64_t)mme_code) << 32) | m_tmsi; random_value = (((uint64_t)mme_code) << 32) | m_tmsi;
if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) { if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) {
LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti,ctxt_pP->rnti); LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti,ctxt_pP->rnti);
if ( (RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_ng_eNB_CU) ||
(RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_CU) ) {
rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti); rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
}
else {
// send message to DU to remove context
AssertFatal(1==0,"Need to added context removal\n");
}
stmsi_received=1; stmsi_received=1;
/* replace rnti in the context */ /* replace rnti in the context */
/* for that, remove the context from the RB tree */ /* for that, remove the context from the RB tree */
......
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