From 9a4fd1bf769f7162101ecf0cffc4fa3bf0b4403b Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 24 Sep 2025 14:34:46 +0200 Subject: [PATCH] Cleanup handover required transfer IE Previously, the RRC layer was incorrectly allocating stack memory for the ho_required_transfer field and passing it to NGAP, however it was not used. The IE is mandatory but contains only 1 optional IE, therefore is encoded in the NG message with empty content. Changes: - Remove unnecessary ho_required_transfer field from pdusession_resource_t definition, the IE is encoded anyway with empty content. If Direct Forwarding Path Availability is needed at any stage in the future it can be added to pdusession_resource_t and filled in RRC. - Add clarifying comment about empty HandoverRequiredTransfer structure --- openair2/COMMON/ngap_messages_types.h | 2 -- openair2/RRC/NR/rrc_gNB_NGAP.c | 4 ---- openair3/NGAP/ngap_gNB_mobility_management.c | 4 +++- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/openair2/COMMON/ngap_messages_types.h b/openair2/COMMON/ngap_messages_types.h index c4bafcee85..d5a5aca5aa 100644 --- a/openair2/COMMON/ngap_messages_types.h +++ b/openair2/COMMON/ngap_messages_types.h @@ -545,8 +545,6 @@ typedef enum { typedef struct { // PDU Session ID uint8_t pdusession_id; - // Handover Required Transfer - byte_array_t ho_required_transfer; } pdusession_resource_t; /* 3GPP TS 38.413 9.2.3.1 */ diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 6b6c579071..dba6fde8ae 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -1610,10 +1610,6 @@ void rrc_gNB_send_NGAP_HANDOVER_REQUIRED(gNB_RRC_INST *rrc, if (!pduSession) continue; pdusession_t *session = &pduSession->param; - // Handover Required Transfer (M) - uint8_t ho_required_transfer[128] = {0}; - msg.pdusessions[i].ho_required_transfer.buf = ho_required_transfer; - msg.pdusessions[i].ho_required_transfer.len = sizeof(ho_required_transfer); // PDU Session ID msg.pdusessions[i].pdusession_id = session->pdusession_id; // PDU Session Resource Information List (O) diff --git a/openair3/NGAP/ngap_gNB_mobility_management.c b/openair3/NGAP/ngap_gNB_mobility_management.c index bfea97c8ff..a6ff4b39a1 100644 --- a/openair3/NGAP/ngap_gNB_mobility_management.c +++ b/openair3/NGAP/ngap_gNB_mobility_management.c @@ -88,7 +88,9 @@ NGAP_NGAP_PDU_t *encode_ng_handover_required(const ngap_handover_required_t *msg asn1cSequenceAdd(ie6->value.choice.PDUSessionResourceListHORqd.list, NGAP_PDUSessionResourceItemHORqd_t, hoRequiredPduSession); // PDU Session ID (M) hoRequiredPduSession->pDUSessionID = msg->pdusessions[i].pdusession_id; - // Handover Required Transfer (M) + // Handover Required Transfer (M) - ASN.1 encoding of empty transfer structure + // This is a mandatory field in the NGAP Handover Required message, however it contains + // only Direct Forwarding Path Availability IE, which is optional and is not sent NGAP_HandoverRequiredTransfer_t hoRequiredTransfer = {0}; uint8_t ho_req_transfer_transparent_container_buffer[128] = {0}; if (LOG_DEBUGFLAG(DEBUG_ASN1))