Commit 95e4270e authored by Robert Schmidt's avatar Robert Schmidt

bugfix: do not trigger e1 bearer setup when no PDU session

It can happen that no PDU session can be setup (e.g., PDU session
already setup). Check that there is at least one before triggering the
message.

Also initialize bearer_req.gNB_cu_cp_ue_id early to avoid uninitialized
IDs (e.g., when no PDU session to be setup).
parent af4b0d53
...@@ -354,7 +354,9 @@ bool trigger_bearer_setup(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, pdusession ...@@ -354,7 +354,9 @@ bool trigger_bearer_setup(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, pdusession
return false; return false;
} }
AssertFatal(UE->as_security_active, "logic bug: security should be active when activating DRBs\n"); AssertFatal(UE->as_security_active, "logic bug: security should be active when activating DRBs\n");
e1ap_bearer_setup_req_t bearer_req = {0}; e1ap_bearer_setup_req_t bearer_req = {
.gNB_cu_cp_ue_id = UE->rrc_ue_id,
};
// Reject bearers setup if there's no CU-UP associated // Reject bearers setup if there's no CU-UP associated
if (!is_cuup_associated(rrc)) { if (!is_cuup_associated(rrc)) {
...@@ -412,6 +414,10 @@ bool trigger_bearer_setup(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, pdusession ...@@ -412,6 +414,10 @@ bool trigger_bearer_setup(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, pdusession
pdu->DRBnGRanList[0] = fill_e1_drb_to_setup(rrc_drb, session, rrc->configuration.um_on_default_drb, UE->redcap_cap); pdu->DRBnGRanList[0] = fill_e1_drb_to_setup(rrc_drb, session, rrc->configuration.um_on_default_drb, UE->redcap_cap);
} }
} }
if (bearer_req.numPDUSessions == 0) {
LOG_W(NR_RRC, "UE %d: No PDU sessions to setup, skipping bearer context setup\n", UE->rrc_ue_id);
return false;
}
/* Limitation: we assume one fixed CU-UP per UE. We base the selection on /* Limitation: we assume one fixed CU-UP per UE. We base the selection on
* NSSAI, but the UE might have multiple PDU sessions with differing slices, * NSSAI, but the UE might have multiple PDU sessions with differing slices,
* in which we might need to select different CU-UPs. In this case, we would * in which we might need to select different CU-UPs. In this case, we would
......
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