pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40976?usp=email )
Change subject: ranap: Create iu_rnc upon rx RESET ......................................................................
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 --- M src/sgsn/gprs_ranap.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/76/40976/1
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index db6cc7c..4b92891 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -674,6 +674,7 @@ 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) { @@ -711,6 +712,9 @@ 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)