lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2025

  • 1 participants
  • 1086 discussions
[S] Change in osmo-sgsn[master]: ranap: Reject InitialUE without RAC IE
by lynxis lazus 28 Aug '25

28 Aug '25
Attention is currently required from: pespin. lynxis lazus has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40972?usp=email ) Change subject: ranap: Reject InitialUE without RAC IE ...................................................................... Patch Set 1: Code-Review+2 (1 comment) Patchset: PS1: Good idea! How about also freeing the iu signalling connection? -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40972?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I7d6b996ddf1c5a7cde1bf06b500d3ed19c6090c6 Gerrit-Change-Number: 40972 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 28 Aug 2025 19:52:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-sgsn[master]: iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses
by lynxis lazus 28 Aug '25

28 Aug '25
Attention is currently required from: pespin. lynxis lazus has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email ) Change subject: iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I04fb37f28b52da9eecb1f8ea40c38ee3eced1c29 Gerrit-Change-Number: 40971 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 28 Aug 2025 19:48:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-sgsn[master]: Split Iu RANAP RAB PS act/deact over different layers
by lynxis lazus 28 Aug '25

28 Aug '25
Attention is currently required from: fixeria, pespin. lynxis lazus has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40961?usp=email ) Change subject: Split Iu RANAP RAB PS act/deact over different layers ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40961?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be Gerrit-Change-Number: 40961 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 28 Aug 2025 19:48:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-sgsn[master]: ranap: Create iu_rnc upon rx RESET
by pespin 28 Aug '25

28 Aug '25
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) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40976?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Iaf31271feb4d88881382ed8594d0d8e20e22b194 Gerrit-Change-Number: 40976 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-sgsn[master]: ranap: Improve error handling in Rx RESET
by pespin 28 Aug '25

28 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40975?usp=email ) Change subject: ranap: Improve error handling in Rx RESET ...................................................................... ranap: Improve error handling in Rx RESET Depends: osmo-iuh.git Change-Id I58c75b3e0e0f33f48d077385ffac820a6b2be59e Change-Id: I2a53e10c3903992a42d081e3ec300fbdb9b3c34c --- M TODO-RELEASE M include/osmocom/sgsn/gprs_ranap.h M src/sgsn/gprs_ranap.c 3 files changed, 68 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/75/40975/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 1dfbdb0..09e8951 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -12,3 +12,4 @@ libosmocore >1.10.0 enum gsm48_gprs_ie_mm: GSM48_IE_GMM_UE_NET_CAP, GSM48_IE_GMM_VD_PREF_UE_USAGE libosmo-gsup-client >1.8.0 osmo_gsup_client_is_connected(), osmo_gsup_client_get_rem_addr(), osmo_gsup_client_get_rem_port() osmo-iuh >1.7.0 ranap multiple params are constified, see osmo-iuh Change-Id I667dc2ef377c1ceb5b11315458f00b282c143c81 +osmo-iuh >1.7.0 ranap_new_msg_error_ind() \ No newline at end of file diff --git a/include/osmocom/sgsn/gprs_ranap.h b/include/osmocom/sgsn/gprs_ranap.h index 491ef6c..3c4f593 100644 --- a/include/osmocom/sgsn/gprs_ranap.h +++ b/include/osmocom/sgsn/gprs_ranap.h @@ -33,6 +33,13 @@ const struct RANAP_Cause *cause, int timeout); +int sgsn_ranap_iu_tx_cl(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *dst_addr, + struct msgb *msg); +int sgsn_ranap_iu_tx_error_ind(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *dst_addr, + const RANAP_Cause_t *cause); + int sgsn_ranap_iu_rx_cl_msg(struct sgsn_sccp_user_iups *scu_iups, const struct osmo_scu_unitdata_param *ud_prim, const uint8_t *data, size_t len); diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 7ddeea8..db6cc7c 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -329,6 +329,30 @@ return sgsn_scu_iups_tx_data_req(uectx->scu_iups, uectx->conn_id, msg); } +/* Send CL RANAP message over SCCP: */ +int sgsn_ranap_iu_tx_cl(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *dst_addr, + struct msgb *msg) +{ + msg->l2h = msg->data; + return osmo_sccp_tx_unitdata_msg(scu_iups->scu, &scu_iups->local_sccp_addr, dst_addr, msg); +} + +/* Send RANAP Error Indication */ +int sgsn_ranap_iu_tx_error_ind(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *dst_addr, + const RANAP_Cause_t *cause) +{ + RANAP_CN_DomainIndicator_t domain = RANAP_CN_DomainIndicator_ps_domain; + struct msgb *ranap_msg; + + ranap_msg = ranap_new_msg_error_ind(cause, NULL, &domain, NULL); + if (!ranap_msg) + return -ENOMEM; + + return sgsn_ranap_iu_tx_cl(scu_iups, dst_addr, ranap_msg); +} + /* Send Iu Release for the given UE connection. * If cause is NULL, Normal Release cause is sent, otherwise * the provided cause. */ @@ -648,19 +672,50 @@ const RANAP_ResetIEs_t *ies) { const RANAP_GlobalRNC_ID_t *grnc_id = NULL; + RANAP_Cause_t cause; + struct osmo_rnc_id rnc_id = {}; struct msgb *resp; - /* FIXME: verify ies.cN_DomainIndicator */ + if (ies->presenceMask & ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT) { + if (ies->cN_DomainIndicator != RANAP_CN_DomainIndicator_ps_domain) { + LOGP(DRANAP, LOGL_ERROR, "Rx RESET: Unexpected CN Domain Indicator %d\n", + (int)ies->cN_DomainIndicator); + cause = (RANAP_Cause_t){ + .present = RANAP_Cause_PR_protocol, + .choice.protocol = RANAP_CauseProtocol_semantic_error, + }; + return sgsn_ranap_iu_tx_error_ind(scu_iups, &ud_prim->calling_addr, &cause); + } + } /* else: assume PS */ - if (ies->presenceMask & RESETIES_RANAP_GLOBALRNC_ID_PRESENT) - grnc_id = &ies->globalRNC_ID; + /* FIXME: support handling Extended RNC-ID instead of Global RNC-ID */ + + if (!(ies->presenceMask & RESETIES_RANAP_GLOBALRNC_ID_PRESENT)) { + LOGP(DRANAP, LOGL_ERROR, + "Rx RESET: Missing RANAP Global-RNC-ID IE\n"); + cause = (RANAP_Cause_t){ + .present = RANAP_Cause_PR_protocol, + .choice.protocol = RANAP_CauseProtocol_transfer_syntax_error, + }; + return sgsn_ranap_iu_tx_error_ind(scu_iups, &ud_prim->calling_addr, &cause); + } + grnc_id = &ies->globalRNC_ID; + + if (iu_grnc_id_parse(&rnc_id, &ies->globalRNC_ID) != 0) { + LOGP(DRANAP, LOGL_ERROR, + "Rx RESET: Failed to parse RANAP Global-RNC-ID IE\n"); + cause = (RANAP_Cause_t){ + .present = RANAP_Cause_PR_protocol, + .choice.protocol = RANAP_CauseProtocol_transfer_syntax_error, + }; + return sgsn_ranap_iu_tx_error_ind(scu_iups, &ud_prim->calling_addr, &cause); + } /* send reset response */ resp = ranap_new_msg_reset_ack(ies->cN_DomainIndicator, grnc_id); if (!resp) return -ENOMEM; - resp->l2h = resp->data; - return osmo_sccp_tx_unitdata_msg(scu_iups->scu, &scu_iups->local_sccp_addr, &ud_prim->calling_addr, resp); + return sgsn_ranap_iu_tx_cl(scu_iups, &ud_prim->calling_addr, resp); } static int ranap_handle_cl_err_ind(struct sgsn_sccp_user_iups *scu_iups, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40975?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I2a53e10c3903992a42d081e3ec300fbdb9b3c34c Gerrit-Change-Number: 40975 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-iuh[master]: ranap: Introduce ranap_new_msg_error_ind()
by pespin 28 Aug '25

28 Aug '25
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-iuh/+/40974?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: ranap: Introduce ranap_new_msg_error_ind() ...................................................................... ranap: Introduce ranap_new_msg_error_ind() Change-Id: I58c75b3e0e0f33f48d077385ffac820a6b2be59e --- M TODO-RELEASE M include/osmocom/ranap/ranap_msg_factory.h M src/ranap_msg_factory.c 3 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/74/40974/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/40974?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I58c75b3e0e0f33f48d077385ffac820a6b2be59e Gerrit-Change-Number: 40974 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-iuh[master]: ranap: Introduce ranap_new_msg_error_ind()
by pespin 28 Aug '25

28 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/40974?usp=email ) Change subject: ranap: Introduce ranap_new_msg_error_ind() ...................................................................... ranap: Introduce ranap_new_msg_error_ind() Change-Id: I58c75b3e0e0f33f48d077385ffac820a6b2be59e --- M TODO-RELEASE M include/osmocom/ranap/ranap_msg_factory.h M src/ranap_msg_factory.c 3 files changed, 61 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/74/40974/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index f825ac1..7af0fca 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -14,3 +14,4 @@ libosmo-ranap move declaration (backwards compatible): asn_debug, asn1_xer_print: use osmocom/iuh/common.h instead of iu_client.h libosmo-ranap move definition (backwards compatible): enum ranap_nsap_addr_enc: use osmocom/ranap/ranap_common.h instead of iu_client.h libosmo-ranap move declaration (backwards compatible): ranap_iu_vty_init, ranap_iu_vty_config_write: use osmocom/ranap/vty.h instead of iu_client.h +libosmo-ranap add API ranap_new_msg_error_ind() diff --git a/include/osmocom/ranap/ranap_msg_factory.h b/include/osmocom/ranap/ranap_msg_factory.h index 0a4bdf2..0baa480 100644 --- a/include/osmocom/ranap/ranap_msg_factory.h +++ b/include/osmocom/ranap/ranap_msg_factory.h @@ -55,6 +55,12 @@ struct msgb *ranap_new_msg_reset_ack(RANAP_CN_DomainIndicator_t domain, const RANAP_GlobalRNC_ID_t *rnc_id); +/*! \brief generate RANAP ERROR INDICATION message */ +struct msgb *ranap_new_msg_error_ind(const RANAP_Cause_t *cause, + const RANAP_CriticalityDiagnostics_t *criticalityDiagnostics, + const RANAP_CN_DomainIndicator_t *domain, + const RANAP_GlobalRNC_ID_t *rnc_id); + /*! \brief generate RANAP INITIAL UE message */ struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps, diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 8f6a99a..794d82d 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -129,6 +129,60 @@ return msg; } +/*! \brief generate RANAP ERROR INDICATION message */ +struct msgb *ranap_new_msg_error_ind(const RANAP_Cause_t *cause, + const RANAP_CriticalityDiagnostics_t *criticalityDiagnostics, + const RANAP_CN_DomainIndicator_t *domain, + const RANAP_GlobalRNC_ID_t *rnc_id) +{ + RANAP_ErrorIndicationIEs_t ies; + RANAP_ErrorIndication_t out; + struct msgb *msg; + int rc; + + memset(&ies, 0, sizeof(ies)); + + if (cause) { + ies.presenceMask |= ERRORINDICATIONIES_RANAP_CAUSE_PRESENT; + memcpy(&ies.cause, cause, sizeof(ies.cause)); + } + + if (criticalityDiagnostics) { + ies.presenceMask |= ERRORINDICATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT; + memcpy(&ies.criticalityDiagnostics, criticalityDiagnostics, sizeof(ies.criticalityDiagnostics)); + } + + if (domain) { + ies.presenceMask |= ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT; + ies.cN_DomainIndicator = *domain; + } + + if (rnc_id) { + ies.presenceMask = RESETACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT; + OCTET_STRING_noalloc(&ies.globalRNC_ID.pLMNidentity, + rnc_id->pLMNidentity.buf, + rnc_id->pLMNidentity.size); + ies.globalRNC_ID.rNC_ID = rnc_id->rNC_ID; + } + + memset(&out, 0, sizeof(out)); + rc = ranap_encode_errorindicationies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding ErrorIndication IEs: %d\n", rc); + return NULL; + } + + msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_ErrorIndication, + RANAP_Criticality_ignore, + &asn_DEF_RANAP_ErrorIndication, + &out); + + /* release dynamic allocations attached to dt */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_ErrorIndication, &out); + + return msg; +} + /*! \brief generate RANAP INITIAL UE message */ struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps, const RANAP_GlobalRNC_ID_t *rnc_id, -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/40974?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I58c75b3e0e0f33f48d077385ffac820a6b2be59e Gerrit-Change-Number: 40974 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-sgsn[master]: iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses
by pespin 28 Aug '25

28 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email ) Change subject: iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses ...................................................................... iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses Change-Id: I04fb37f28b52da9eecb1f8ea40c38ee3eced1c29 --- M src/sgsn/iu_rnc.c 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/71/40971/1 diff --git a/src/sgsn/iu_rnc.c b/src/sgsn/iu_rnc.c index 970f628..b1af9ba 100644 --- a/src/sgsn/iu_rnc.c +++ b/src/sgsn/iu_rnc.c @@ -98,13 +98,6 @@ return NULL; } -static bool same_sccp_addr(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b) -{ - char buf[256]; - osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); - return !strcmp(buf, osmo_sccp_addr_dump(b)); -} - static void global_iu_event_new_area(const struct osmo_rnc_id *rnc_id, const struct osmo_routing_area_id *rai) { struct ranap_iu_event_new_area new_area = (struct ranap_iu_event_new_area) { @@ -135,7 +128,7 @@ rnc = iu_rnc_id_find(rnc_id); if (rnc) { - if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + if (!osmo_sccp_addr_ri_cmp(&rnc->sccp_addr, addr)) { LOGP(DRANAP, LOGL_NOTICE, "RNC %s changed its SCCP addr to %s (LAC/RAC %s)\n", osmo_rnc_id_name(rnc_id), osmo_sccp_addr_dump(addr), osmo_rai_name2(rai)); rnc->sccp_addr = *addr; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I04fb37f28b52da9eecb1f8ea40c38ee3eced1c29 Gerrit-Change-Number: 40971 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-sgsn[master]: ranap: Reject InitialUE without RAC IE
by pespin 28 Aug '25

28 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40972?usp=email ) Change subject: ranap: Reject InitialUE without RAC IE ...................................................................... ranap: Reject InitialUE without RAC IE According to 3GPP TS 25.413 clauses 8.22.2 and 9.1.33, RAC IE is mandatory in PS domain. Change-Id: I7d6b996ddf1c5a7cde1bf06b500d3ed19c6090c6 --- M src/sgsn/gprs_ranap.c 1 file changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/72/40972/1 diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 15f5433..0ddb959 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -379,15 +379,16 @@ return -1; } - if (ies->presenceMask & INITIALUE_MESSAGEIES_RANAP_RAC_PRESENT) { - ra_id.rac = asn1str_to_u8(&ies->rac); - if (ra_id.rac == OSMO_RESERVED_RAC) { - LOGP(DRANAP, LOGL_ERROR, - "Rejecting RNC with invalid/internally used RAC 0x%02x\n", ra_id.rac); - return -1; - } - } else { - ra_id.rac = OSMO_RESERVED_RAC; + if (!(ies->presenceMask & INITIALUE_MESSAGEIES_RANAP_RAC_PRESENT)) { + LOGP(DRANAP, LOGL_ERROR, "Rejecting InitialUE msg without RAC IE\n"); + return -1; + } + + ra_id.rac = asn1str_to_u8(&ies->rac); + if (ra_id.rac == OSMO_RESERVED_RAC) { + LOGP(DRANAP, LOGL_ERROR, + "Rejecting RNC with invalid/internally used RAC 0x%02x\n", ra_id.rac); + return -1; } if (iu_grnc_id_parse(&rnc_id, &ies->globalRNC_ID) != 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40972?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I7d6b996ddf1c5a7cde1bf06b500d3ed19c6090c6 Gerrit-Change-Number: 40972 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-sgsn[master]: iu_rnc: Split iu_rnc_register API into 2 steps
by pespin 28 Aug '25

28 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40973?usp=email ) Change subject: iu_rnc: Split iu_rnc_register API into 2 steps ...................................................................... iu_rnc: Split iu_rnc_register API into 2 steps Split lookup+allocation from RAI updating. This will be needed once we start creating iu_rnc objects upon SCCP rx RANAP RESET messages, which hold Global RNC-ID but no RAI information. Change-Id: I3761cc539c63a7ed680b04bb8136a43d397c10aa --- M include/osmocom/sgsn/iu_rnc.h M src/sgsn/gprs_ranap.c M src/sgsn/iu_rnc.c 3 files changed, 41 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/73/40973/1 diff --git a/include/osmocom/sgsn/iu_rnc.h b/include/osmocom/sgsn/iu_rnc.h index 895e922..344337d 100644 --- a/include/osmocom/sgsn/iu_rnc.h +++ b/include/osmocom/sgsn/iu_rnc.h @@ -30,6 +30,6 @@ struct llist_head lac_rac_list; }; -struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id, - const struct osmo_routing_area_id *rai, - const struct osmo_sccp_addr *addr); +struct ranap_iu_rnc *iu_rnc_find_or_create(const struct osmo_rnc_id *rnc_id, + const struct osmo_sccp_addr *addr); +void iu_rnc_update_rai_seen(struct ranap_iu_rnc *rnc, const struct osmo_routing_area_id *rai); diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 0ddb959..7ddeea8 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -374,6 +374,7 @@ struct msgb *msg = msgb_alloc(256, "RANAP->NAS"); struct ranap_iu_rnc *rnc; + if (ranap_parse_lai(&ra_id, &ies->lai) != 0) { LOGP(DRANAP, LOGL_ERROR, "Failed to parse RANAP LAI IE\n"); return -1; @@ -404,7 +405,9 @@ gprs_rai_to_osmo(&ra_id2, &ra_id); /* Make sure we know the RNC Id and LAC+RAC coming in on this connection. */ - rnc = iu_rnc_register(&rnc_id, &ra_id2, rem_sccp_addr); + rnc = iu_rnc_find_or_create(&rnc_id, rem_sccp_addr); + OSMO_ASSERT(rnc); + iu_rnc_update_rai_seen(rnc, &ra_id2); ue = ue_conn_ctx_alloc(rnc, scu_iups, conn_id); OSMO_ASSERT(ue); diff --git a/src/sgsn/iu_rnc.c b/src/sgsn/iu_rnc.c index b1af9ba..8bb5bc1 100644 --- a/src/sgsn/iu_rnc.c +++ b/src/sgsn/iu_rnc.c @@ -60,6 +60,35 @@ return rnc; } +static struct ranap_iu_rnc *iu_rnc_find_by_id(const struct osmo_rnc_id *rnc_id) +{ + struct ranap_iu_rnc *rnc; + llist_for_each_entry(rnc, &sgsn->rnc_list, entry) { + if (!osmo_rnc_id_cmp(&rnc->rnc_id, rnc_id)) + return rnc; + } + return NULL; +} + +struct ranap_iu_rnc *iu_rnc_find_or_create(const struct osmo_rnc_id *rnc_id, + const struct osmo_sccp_addr *addr) +{ + struct ranap_iu_rnc *rnc; + + /* Make sure we know this rnc_id and that this SCCP address is in our records */ + rnc = iu_rnc_find_by_id(rnc_id); + if (rnc) { + if (!osmo_sccp_addr_ri_cmp(&rnc->sccp_addr, addr)) { + LOGP(DRANAP, LOGL_NOTICE, "RNC %s changed its SCCP addr to %s\n", + osmo_rnc_id_name(&rnc->rnc_id), osmo_sccp_addr_dump(addr)); + rnc->sccp_addr = *addr; + } + } else { + rnc = iu_rnc_alloc(rnc_id, addr); + } + return rnc; +} + /* Find a match for the given LAC (and RAC). For CS, pass rac as 0. * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no match is found, or to the * match if a match is found. Return true if a match is found. */ @@ -88,16 +117,6 @@ return false; } -static struct ranap_iu_rnc *iu_rnc_id_find(struct osmo_rnc_id *rnc_id) -{ - struct ranap_iu_rnc *rnc; - llist_for_each_entry(rnc, &sgsn->rnc_list, entry) { - if (!osmo_rnc_id_cmp(&rnc->rnc_id, rnc_id)) - return rnc; - } - return NULL; -} - static void global_iu_event_new_area(const struct osmo_rnc_id *rnc_id, const struct osmo_routing_area_id *rai) { struct ranap_iu_event_new_area new_area = (struct ranap_iu_event_new_area) { @@ -116,26 +135,12 @@ global_iu_event(NULL, RANAP_IU_EVENT_NEW_AREA, &new_area); } -struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id, - const struct osmo_routing_area_id *rai, - const struct osmo_sccp_addr *addr) + +void iu_rnc_update_rai_seen(struct ranap_iu_rnc *rnc, const struct osmo_routing_area_id *rai) { - struct ranap_iu_rnc *rnc; struct ranap_iu_rnc *old_rnc; struct iu_lac_rac_entry *lre; - /* Make sure we know this rnc_id and that this SCCP address is in our records */ - rnc = iu_rnc_id_find(rnc_id); - - if (rnc) { - if (!osmo_sccp_addr_ri_cmp(&rnc->sccp_addr, addr)) { - LOGP(DRANAP, LOGL_NOTICE, "RNC %s changed its SCCP addr to %s (LAC/RAC %s)\n", - osmo_rnc_id_name(rnc_id), osmo_sccp_addr_dump(addr), osmo_rai_name2(rai)); - rnc->sccp_addr = *addr; - } - } else - rnc = iu_rnc_alloc(rnc_id, addr); - /* Detect whether the LAC,RAC is already recorded in another RNC */ iu_rnc_lac_rac_find(&old_rnc, &lre, rai); @@ -149,17 +154,15 @@ llist_del(&lre->entry); llist_add(&lre->entry, &rnc->lac_rac_list); - global_iu_event_new_area(rnc_id, rai); + global_iu_event_new_area(&rnc->rnc_id, rai); } else if (!old_rnc) { /* LAC, RAC not recorded yet */ LOGP(DRANAP, LOGL_NOTICE, "RNC %s: new LAC/RAC %s\n", - osmo_rnc_id_name(rnc_id), osmo_rai_name2(rai)); + osmo_rnc_id_name(&rnc->rnc_id), osmo_rai_name2(rai)); lre = talloc_zero(rnc, struct iu_lac_rac_entry); lre->rai = *rai; llist_add(&lre->entry, &rnc->lac_rac_list); - global_iu_event_new_area(rnc_id, rai); + global_iu_event_new_area(&rnc->rnc_id, rai); } /* else, LAC,RAC already recorded with the current RNC. */ - - return rnc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40973?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3761cc539c63a7ed680b04bb8136a43d397c10aa Gerrit-Change-Number: 40973 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 109
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.