ranap: Create iu_rnc upon rx RESET

RANAP RESET, the first message an SGSN usually receives from an RNC,
contain the GlobalRNC-ID we can already use to register the iu_rnc
object.
This allows keeping track of peers since first message, before first
InitialUE message is received.
Once we start tracking peer RNC state within osmo-sgsn (as we already do
in other osmo-* programs), this will be needed.

Change-Id: Iaf31271feb4d88881382ed8594d0d8e20e22b194
This commit is contained in:
Pau Espin Pedrol
2025-08-28 17:42:37 +02:00
parent b9c9271a1f
commit 7673bbd7ad

View File

@@ -673,6 +673,7 @@ static int ranap_handle_cl_reset_req(struct sgsn_sccp_user_iups *scu_iups,
const RANAP_GlobalRNC_ID_t *grnc_id = NULL;
RANAP_Cause_t cause;
struct osmo_rnc_id rnc_id = {};
struct ranap_iu_rnc *rnc;
struct msgb *resp;
if (ies->presenceMask & ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT) {
@@ -710,6 +711,9 @@ static int ranap_handle_cl_reset_req(struct sgsn_sccp_user_iups *scu_iups,
return sgsn_ranap_iu_tx_error_ind(scu_iups, &ud_prim->calling_addr, &cause);
}
rnc = iu_rnc_find_or_create(&rnc_id, &ud_prim->calling_addr);
OSMO_ASSERT(rnc);
/* send reset response */
resp = ranap_new_msg_reset_ack(ies->cN_DomainIndicator, grnc_id);
if (!resp)