Commit e389b798 authored by Robert Schmidt's avatar Robert Schmidt

F1 handlers: Improve error message if RNTI obtained through CU/DU ID differ

parent 58850e3c
...@@ -775,7 +775,6 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -775,7 +775,6 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseRequest_t *container; F1AP_UEContextReleaseRequest_t *container;
F1AP_UEContextReleaseRequestIEs_t *ie; F1AP_UEContextReleaseRequestIEs_t *ie;
rnti_t rnti;
DevAssert(pdu); DevAssert(pdu);
...@@ -783,14 +782,16 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -783,14 +782,16 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* GNB_CU_UE_F1AP_ID */ /* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance], ie->value.choice.GNB_CU_UE_F1AP_ID); const rnti_t rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance],
ie->value.choice.GNB_CU_UE_F1AP_ID);
/* GNB_DU_UE_F1AP_ID */ /* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
AssertFatal(rnti == f1ap_get_rnti_by_du_id(&f1ap_cu_ue[instance], const rnti_t rnti2 = f1ap_get_rnti_by_du_id(&f1ap_cu_ue[instance],
ie->value.choice.GNB_DU_UE_F1AP_ID), ie->value.choice.GNB_DU_UE_F1AP_ID);
"RNTI obtained through DU ID is different from CU ID\n"); AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti2, rnti);
/* Cause */ /* Cause */
/* We don't care for the moment /* We don't care for the moment
...@@ -920,7 +921,6 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -920,7 +921,6 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseComplete_t *container; F1AP_UEContextReleaseComplete_t *container;
F1AP_UEContextReleaseCompleteIEs_t *ie; F1AP_UEContextReleaseCompleteIEs_t *ie;
rnti_t rnti;
DevAssert(pdu); DevAssert(pdu);
...@@ -928,14 +928,16 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -928,14 +928,16 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
/* GNB_CU_UE_F1AP_ID */ /* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance], ie->value.choice.GNB_CU_UE_F1AP_ID); const rnti_t rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance],
ie->value.choice.GNB_CU_UE_F1AP_ID);
/* GNB_DU_UE_F1AP_ID */ /* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
AssertFatal(rnti == f1ap_get_rnti_by_du_id(&f1ap_cu_ue[instance], const rnti_t rnti2 = f1ap_get_rnti_by_du_id(&f1ap_cu_ue[instance],
ie->value.choice.GNB_DU_UE_F1AP_ID), ie->value.choice.GNB_DU_UE_F1AP_ID);
"RNTI obtained through DU ID is different from CU ID\n"); AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti2, rnti);
/* Optional*/ /* Optional*/
/* CriticalityDiagnostics */ /* CriticalityDiagnostics */
......
...@@ -669,9 +669,11 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -669,9 +669,11 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
/* GNB_DU_UE_F1AP_ID */ /* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
AssertFatal(ctxt.rnti == f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance], const rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],
ie->value.choice.GNB_DU_UE_F1AP_ID), ie->value.choice.GNB_DU_UE_F1AP_ID);
"RNTI obtained through DU ID is different from CU ID\n"); AssertFatal(ctxt.rnti == rnti,
"RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti, ctxt.rnti);
/* We don't need the Cause */ /* We don't need the Cause */
......
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