diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index d168ae6b4c92fcd368922728c6244cfcbfc2f20a..31378165108758cd90e3ef76728895817efaacf2 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1525,13 +1525,9 @@ static int nr_rrc_gNB_decode_ccch(module_id_t module_id, const f1ap_initial_ul_r case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest: LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %04x)\n", rnti); - rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, rnti); - /* TODO this check is wrong, on different DUs there can be the same RNTI, this should not matter for us */ - if (ue_context_p != NULL) { - LOG_W(NR_RRC, "Got RRC setup request for a already registered RNTI %x, dropping the old one and give up this rrcSetupRequest\n", ue_context_p->ue_context.rnti); - rrc_gNB_remove_ue_context(gnb_rrc_inst, ue_context_p); - } else { + { rrcSetupRequest = &ul_ccch_msg->message.choice.c1->choice.rrcSetupRequest->rrcSetupRequest; + rrc_gNB_ue_context_t *ue_context_p = NULL; if (NR_InitialUE_Identity_PR_randomValue == rrcSetupRequest->ue_Identity.present) { /* randomValue BIT STRING (SIZE (39)) */ if (rrcSetupRequest->ue_Identity.choice.randomValue.size != 5) { // 39-bit random value diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.c b/openair2/RRC/NR/rrc_gNB_UE_context.c index aabcbbf44d6f29700c4e08a115d0d2efe00b9109..e73375fb65238f3b81390cf4bdcbbe286b4147cf 100644 --- a/openair2/RRC/NR/rrc_gNB_UE_context.c +++ b/openair2/RRC/NR/rrc_gNB_UE_context.c @@ -173,16 +173,7 @@ rrc_gNB_ue_context_t *rrc_gNB_create_ue_context(rnti_t rnti, uint32_t du_ue_id) //----------------------------------------------------------------------------- { - rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc_instance_pP, rnti); - - /* TODO: this should not matter, we can have multiple UEs at different DUs - * with the same RNTI! */ - if (ue_context_p) { - LOG_E(NR_RRC, "Cannot create new UE context, already exist rnti: %04x\n", rnti); - return ue_context_p; - } - - ue_context_p = rrc_gNB_allocate_new_ue_context(rrc_instance_pP); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_allocate_new_ue_context(rrc_instance_pP); if (ue_context_p == NULL) return NULL;