Merge remote-tracking branch 'origin/bugfix-ambr-is-optional' into integration_2025_w28 (!3498)

bugfix: UE AMBR is optional

This was a problem with open5gs and more than one PDU session. The core network
sets UE AMBR only once, leading to failure in the gNB for the second PDU session.
(A proper handling of AMBR has to be develop at some point in the gNB.)
This commit is contained in:
Jaroslava Fiedlerova
2025-07-09 11:08:25 +02:00
3 changed files with 11 additions and 3 deletions
+2
View File
@@ -561,6 +561,7 @@ typedef struct ngap_initial_context_setup_req_s {
uint64_t amf_ue_ngap_id;
/* UE aggregate maximum bitrate */
bool has_ue_ambr;
ngap_ambr_t ue_ambr;
/* guami */
@@ -631,6 +632,7 @@ typedef struct ngap_pdusession_setup_req_s {
pdusession_resource_item_t pdusession[NGAP_MAX_PDU_SESSION];
/* UE Aggregated Max Bitrates */
bool has_ue_ambr;
ngap_ambr_t ueAggMaxBitRate;
} ngap_pdusession_setup_req_t;
+3 -1
View File
@@ -841,7 +841,9 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
for (int i = 0; i < msg->nb_pdusessions_tosetup; ++i)
cp_pdusession_resource_item_to_pdusession(&to_setup[i], &msg->pdusession[i]);
if (!trigger_bearer_setup(rrc, UE, msg->nb_pdusessions_tosetup, to_setup, msg->ueAggMaxBitRate.br_dl)) {
uint64_t dl_ambr = msg->has_ue_ambr ? msg->ueAggMaxBitRate.br_dl : 0;
if (!trigger_bearer_setup(rrc, UE, msg->nb_pdusessions_tosetup, to_setup, dl_ambr)) {
// Reject PDU Session Resource setup if there's no CU-UP associated
LOG_W(NR_RRC, "UE %d: reject PDU Session Setup in PDU Session Resource Setup Response\n", UE->rrc_ue_id);
ngap_cause_t cause = {.type = NGAP_CAUSE_RADIO_NETWORK, .value = NGAP_CAUSE_RADIO_NETWORK_RESOURCES_NOT_AVAILABLE_FOR_THE_SLICE};
+6 -2
View File
@@ -843,6 +843,7 @@ static int ngap_gNB_handle_initial_context_request(sctp_assoc_t assoc_id, uint32
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, false);
if (ie != NULL) {
msg->ue_ambr = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
msg->has_ue_ambr = true;
}
/* id-GUAMI */
@@ -1022,8 +1023,11 @@ static int ngap_gNB_handle_pdusession_setup_request(sctp_assoc_t assoc_id, uint3
/* UE Aggregated Maximum Bitrate */
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, true);
msg->ueAggMaxBitRate = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, false);
if (ie != NULL) {
msg->ueAggMaxBitRate = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
msg->has_ue_ambr = true;
}
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq, true);