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
[XS] Change in osmo-sgsn[master]: iu_rnc: Constify function params
by fixeria 27 Aug '25

27 Aug '25
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40959?usp=email ) Change subject: iu_rnc: Constify function params ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40959?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: I288bc21d24aa5abd3d9bd97e796ac9f8590290bd Gerrit-Change-Number: 40959 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 27 Aug 2025 18:18:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-sgsn[master]: sccp: Introduce helper func sgsn_sccp_user_iups_tx_data_req()
by fixeria 27 Aug '25

27 Aug '25
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40958?usp=email ) Change subject: sccp: Introduce helper func sgsn_sccp_user_iups_tx_data_req() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40958?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: Id34f86b4f5e40ddceac4066ec18ebc60529cafab Gerrit-Change-Number: 40958 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 27 Aug 2025 18:18:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XL] Change in osmo-sgsn[master]: Split most of iu_client.{c,h} into sccp.{c,h} and iu_rnc.{c,h}
by fixeria 27 Aug '25

27 Aug '25
Attention is currently required from: lynxis lazus, osmith, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40956?usp=email ) Change subject: Split most of iu_client.{c,h} into sccp.{c,h} and iu_rnc.{c,h} ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40956?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: I4c792ae665720460b5a954b5c7cbfe5acbc37473 Gerrit-Change-Number: 40956 Gerrit-PatchSet: 4 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-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 27 Aug 2025 18:15:02 +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 pespin 27 Aug '25

27 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-sgsn/+/40961?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Split Iu RANAP RAB PS act/deact over different layers ...................................................................... Split Iu RANAP RAB PS act/deact over different layers Properly separate logic acting on objects vs logic building and generating RANAP msg on the wire. Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be --- M include/osmocom/sgsn/gprs_ranap.h M include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/pdpctx.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_ranap.c M src/sgsn/mmctx.c M src/sgsn/pdpctx.c M src/sgsn/sgsn_libgtp.c 8 files changed, 78 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/61/40961/3 -- 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: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be Gerrit-Change-Number: 40961 Gerrit-PatchSet: 3 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-sgsn[master]: Move gsm0408_gprs_rcvmsg_iu to gprs_gmm.{c,h}
by fixeria 27 Aug '25

27 Aug '25
Attention is currently required from: lynxis lazus, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40954?usp=email ) Change subject: Move gsm0408_gprs_rcvmsg_iu to gprs_gmm.{c,h} ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40954?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: I09c19689fd7016b76ebeee821b551427965b7cf1 Gerrit-Change-Number: 40954 Gerrit-PatchSet: 1 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-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 27 Aug 2025 18:04:54 +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 pespin 27 Aug '25

27 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-sgsn/+/40961?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: Split Iu RANAP RAB PS act/deact over different layers ...................................................................... Split Iu RANAP RAB PS act/deact over different layers Properly separate logic acting on objects vs logic building and generating RANAP msg on the wire. Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be --- M include/osmocom/sgsn/gprs_ranap.h M include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/pdpctx.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_ranap.c M src/sgsn/mmctx.c M src/sgsn/pdpctx.c M src/sgsn/sgsn_libgtp.c 8 files changed, 72 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/61/40961/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: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be Gerrit-Change-Number: 40961 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-sgsn[master]: Split Iu RANAP RAB PS act/deact over different layers
by pespin 27 Aug '25

27 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40961?usp=email ) Change subject: Split Iu RANAP RAB PS act/deact over different layers ...................................................................... Split Iu RANAP RAB PS act/deact over different layers Properly separate logic acting on objects vs logic building and generating RANAP msg on the wire. Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be --- M include/osmocom/sgsn/gprs_ranap.h M include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/pdpctx.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_ranap.c M src/sgsn/mmctx.c M src/sgsn/pdpctx.c M src/sgsn/sgsn_libgtp.c 8 files changed, 71 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/61/40961/1 diff --git a/include/osmocom/sgsn/gprs_ranap.h b/include/osmocom/sgsn/gprs_ranap.h index 80b57e6..e2450bd 100644 --- a/include/osmocom/sgsn/gprs_ranap.h +++ b/include/osmocom/sgsn/gprs_ranap.h @@ -1,5 +1,7 @@ #pragma once +#include "config.h" + #include <osmocom/core/msgb.h> #ifdef BUILD_IU @@ -11,12 +13,11 @@ struct sgsn_mm_ctx; struct sgsn_pdp_ctx; -void activate_pdp_rabs(struct sgsn_mm_ctx *ctx); int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); -int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp); int ranap_iu_tx(struct msgb *msg, uint8_t sapi); -int ranap_iu_rab_deact(struct ranap_ue_conn_ctx *ue_ctx, uint8_t rab_id); +int sgsn_ranap_iu_tx_rab_ps_ass_req(struct ranap_ue_conn_ctx *ue_ctx, + uint8_t rab_id, uint32_t gtp_ip, uint32_t gtp_tei); int ranap_iu_tx_sec_mode_cmd(struct ranap_ue_conn_ctx *uectx, struct osmo_auth_vector *vec, int send_ck, int new_key); int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *ue_ctx, const char *imsi); diff --git a/include/osmocom/sgsn/mmctx.h b/include/osmocom/sgsn/mmctx.h index 760e2c4..c0a5735 100644 --- a/include/osmocom/sgsn/mmctx.h +++ b/include/osmocom/sgsn/mmctx.h @@ -289,3 +289,5 @@ /* Called on subscriber data updates */ void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx); + +void sgsn_mm_ctx_iu_activate_rabs(struct sgsn_mm_ctx *ctx); diff --git a/include/osmocom/sgsn/pdpctx.h b/include/osmocom/sgsn/pdpctx.h index 39d744a..a4bbd97 100644 --- a/include/osmocom/sgsn/pdpctx.h +++ b/include/osmocom/sgsn/pdpctx.h @@ -1,5 +1,7 @@ #pragma once +#include "config.h" + #include <stdint.h> #include <netinet/in.h> #include <inttypes.h> @@ -94,5 +96,10 @@ void sgsn_pdp_ctx_terminate(struct sgsn_pdp_ctx *pdp); void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp); +#ifdef BUILD_IU +int sgsn_pdp_ctx_iu_rab_activate(struct sgsn_pdp_ctx *pdp, uint8_t rab_id); +int sgsn_pdp_ctx_iu_rab_deactivate(struct sgsn_pdp_ctx *pdp, uint8_t rab_id); +#endif /* ifdef BUILD_IU */ + char *gprs_pdpaddr2str(uint8_t *pdpa, uint8_t len, bool return_ipv6); diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index d2627a3..5a67fdd 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1013,8 +1013,9 @@ osmo_fsm_inst_dispatch(ctx->iu.mm_state_fsm, E_PMM_PS_CONN_ESTABLISH, NULL); rc = gsm48_tx_gmm_service_ack(ctx); - if (ctx->iu.service.type != GPRS_SERVICE_T_SIGNALLING) - activate_pdp_rabs(ctx); + if (ctx->ran_type == MM_CTX_T_UTRAN_Iu && + ctx->iu.service.type != GPRS_SERVICE_T_SIGNALLING) + sgsn_mm_ctx_iu_activate_rabs(ctx); return rc; #endif diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index c0bef33..981ec64 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -86,17 +86,6 @@ } #endif -/* Send RAB activation requests for all PDP contexts */ -void activate_pdp_rabs(struct sgsn_mm_ctx *ctx) -{ - struct sgsn_pdp_ctx *pdp; - if (ctx->ran_type != MM_CTX_T_UTRAN_Iu) - return; - llist_for_each_entry(pdp, &ctx->pdp_list, list) { - iu_rab_act_ps(pdp->nsapi, pdp); - } -} - /* Callback for RAB assignment response */ static int sgsn_ranap_rab_ass_resp(struct sgsn_mm_ctx *ctx, RANAP_RAB_SetupOrModifiedItemIEs_t *setup_ies) { @@ -299,34 +288,18 @@ ctx->iu.ue_ctx = NULL; } -int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp) +int sgsn_ranap_iu_tx_rab_ps_ass_req(struct ranap_ue_conn_ctx *ue_ctx, + uint8_t rab_id, uint32_t gtp_ip, uint32_t gtp_tei) { struct msgb *msg; - struct sgsn_mm_ctx *mm = pdp->mm; - struct ranap_ue_conn_ctx *uectx; - uint32_t ggsn_ip; - bool use_x213_nsap; + bool use_x213_nsap = (ue_ctx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - uectx = mm->iu.ue_ctx; - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - /* Get the IP address for ggsn user plane */ - memcpy(&ggsn_ip, pdp->lib->gsnru.v, pdp->lib->gsnru.l); - ggsn_ip = htonl(ggsn_ip); - - LOGP(DRANAP, LOGL_DEBUG, "Assigning RAB: rab_id=%d, ggsn_ip=%x," - " teid_gn=%x, use_x213_nsap=%d\n", + LOGP(DRANAP, LOGL_DEBUG, + "Assigning RAB: rab_id=%u, ggsn_ip=%x, teid_gn=%x, use_x213_nsap=%d\n", rab_id, ggsn_ip, pdp->lib->teid_gn, use_x213_nsap); - msg = ranap_new_msg_rab_assign_data(rab_id, ggsn_ip, - pdp->lib->teid_gn, use_x213_nsap); - return sgsn_sccp_user_iups_tx_data_req(uectx->scu_iups, uectx->conn_id, msg); -} - -int ranap_iu_rab_deact(struct ranap_ue_conn_ctx *ue_ctx, uint8_t rab_id) -{ - /* FIXME */ - return -1; + msg = ranap_new_msg_rab_assign_data(rab_id, gtp_ip, gtp_tei, use_x213_nsap); + return sgsn_sccp_user_iups_tx_data_req(ue_ctx->scu_iups, ue_ctx->conn_id, msg); } int ranap_iu_tx_sec_mode_cmd(struct ranap_ue_conn_ctx *uectx, struct osmo_auth_vector *vec, diff --git a/src/sgsn/mmctx.c b/src/sgsn/mmctx.c index 40f902b..c7601ad 100644 --- a/src/sgsn/mmctx.c +++ b/src/sgsn/mmctx.c @@ -281,6 +281,16 @@ #endif } +/* Send RAB activation requests for all PDP contexts */ +void sgsn_mm_ctx_iu_activate_rabs(struct sgsn_mm_ctx *ctx) +{ + struct sgsn_pdp_ctx *pdp; + OSMO_ASSERT(ctx->ran_type == MM_CTX_T_UTRAN_Iu); + + llist_for_each_entry(pdp, &ctx->pdp_list, list) + sgsn_pdp_ctx_iu_rab_activate(pdp, pdp->nsapi); +} + /* this is a hard _free_ function, it doesn't clean up the PDP contexts * in libgtp! */ diff --git a/src/sgsn/pdpctx.c b/src/sgsn/pdpctx.c index e779420..b9f462c 100644 --- a/src/sgsn/pdpctx.c +++ b/src/sgsn/pdpctx.c @@ -19,6 +19,8 @@ * */ +#include "config.h" + #include <stdint.h> #include <osmocom/core/linuxlist.h> @@ -36,6 +38,7 @@ #include <osmocom/sgsn/gprs_llc_xid.h> #include <osmocom/sgsn/gprs_sndcp.h> #include <osmocom/sgsn/gprs_llc.h> +#include <osmocom/sgsn/gprs_ranap.h> #include <osmocom/sgsn/gprs_sm.h> #include <osmocom/sgsn/gtp.h> @@ -156,3 +159,36 @@ talloc_free(pdp); } + +#ifdef BUILD_IU +int sgsn_pdp_ctx_iu_rab_activate(struct sgsn_pdp_ctx *pdp, uint8_t rab_id) +{ + struct sgsn_mm_ctx *mm = pdp->mm; + struct ranap_ue_conn_ctx *ue_ctx; + uint32_t ggsn_ip; + + OSMO_ASSERT(mm->ran_type == MM_CTX_T_UTRAN_Iu); + ue_ctx = mm->iu.ue_ctx; + + /* Get the IP address for ggsn user plane */ + memcpy(&ggsn_ip, pdp->lib->gsnru.v, pdp->lib->gsnru.l); + ggsn_ip = htonl(ggsn_ip); + + LOGPDPCTXP(pdp, LOGL_INFO, "Activate RAB: rab_id=%u, ggsn_ip=%x, teid_gn=%x\n", + rab_id, ggsn_ip, pdp->lib->teid_gn) + + return sgsn_ranap_iu_tx_rab_ps_ass_req(ue_ctx, rab_id, ggsn_ip, pdp->lib->teid_gn); +} + +int sgsn_pdp_ctx_iu_rab_deactivate(struct sgsn_pdp_ctx *pdp, uint8_t rab_id) +{ + struct sgsn_mm_ctx *mm = pdp->mm; + + OSMO_ASSERT(mm->ran_type == MM_CTX_T_UTRAN_Iu); + + LOGPDPCTXP(pdp, LOGL_NOTICE, "Release RAB: rab_id=%u not supported!\n", rab_id); + //struct ranap_ue_conn_ctx *ue_ctx = mm->iu.ue_ctx; + // TODO: add new function similar to sgsn_ranap_iu_tx_rab_ps_ass_req() but requesting relese of RAB. + return -ENOTSUP; +} +#endif /* ifdef BUILD_IU */ diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index edfe250..e637967 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -439,7 +439,7 @@ } else if (pctx->mm->ran_type == MM_CTX_T_UTRAN_Iu) { #ifdef BUILD_IU /* Activate a radio bearer */ - iu_rab_act_ps(pdp->nsapi, pctx); + sgsn_pdp_ctx_iu_rab_activate(pctx, pdp->nsapi); return 0; #else return -ENOTSUP; @@ -564,7 +564,7 @@ } else { #ifdef BUILD_IU /* Deactivate radio bearer */ - ranap_iu_rab_deact(pctx->mm->iu.ue_ctx, 1); + sgsn_pdp_ctx_iu_rab_deactivate(pctx, 1); #else return -ENOTSUP; #endif -- 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: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be Gerrit-Change-Number: 40961 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-sgsn[master]: ranap: Clean up RANAP rx path param passing
by pespin 27 Aug '25

27 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40960?usp=email ) Change subject: ranap: Clean up RANAP rx path param passing ...................................................................... ranap: Clean up RANAP rx path param passing Use the osmo-iuh ranap_cn_rx_*_decode2() APIs directly. This allows getting rid of extra "ctx" temporary structs and another level of cb indirection. Take the chance to update most pointers consitfying them. Depends: osmo-iuh.git Change-Id I667dc2ef377c1ceb5b11315458f00b282c143c81 Change-Id: Ib3c00b5105b7ba4bb1a2dad1a14bea233a03c358 --- M TODO-RELEASE M include/osmocom/sgsn/gprs_ranap.h M src/sgsn/gprs_ranap.c 3 files changed, 102 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/60/40960/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 662cdb5..1dfbdb0 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,3 +11,4 @@ libgtp >1.12.0 gtp_set_cb_update_context_ind(), gtp_update_context_resp() 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 diff --git a/include/osmocom/sgsn/gprs_ranap.h b/include/osmocom/sgsn/gprs_ranap.h index 8a6c189..80b57e6 100644 --- a/include/osmocom/sgsn/gprs_ranap.h +++ b/include/osmocom/sgsn/gprs_ranap.h @@ -39,11 +39,14 @@ void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx, const struct RANAP_Cause *cause); -int sgsn_ranap_iu_rx_cl_msg(struct sgsn_sccp_user_iups *scu_iups, struct osmo_scu_unitdata_param *ud_prim, - uint8_t *data, size_t len); -int sgsn_ranap_iu_rx_co_initial_msg(struct sgsn_sccp_user_iups *scu_iups, const struct osmo_sccp_addr *rem_sccp_addr, - uint32_t conn_id, uint8_t *data, size_t len); -int sgsn_ranap_iu_rx_co_msg(struct ranap_ue_conn_ctx *ue_ctx, uint8_t *data, size_t len); +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); +int sgsn_ranap_iu_rx_co_initial_msg(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *rem_sccp_addr, + uint32_t conn_id, + const uint8_t *data, size_t len); +int sgsn_ranap_iu_rx_co_msg(struct ranap_ue_conn_ctx *ue_ctx, const uint8_t *data, size_t len); #else /* ifndef BUILD_IU */ inline static void sgsn_ranap_iu_free(void *ctx) {}; diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 008063b..c0bef33 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -60,7 +60,7 @@ uint16_t rnc_id; }; -static int iu_grnc_id_parse(struct osmo_rnc_id *dst, struct RANAP_GlobalRNC_ID *src) +static int iu_grnc_id_parse(struct osmo_rnc_id *dst, const struct RANAP_GlobalRNC_ID *src) { /* The size is coming from arbitrary sender, check it gracefully */ if (src->pLMNidentity.size != 3) { @@ -86,17 +86,6 @@ } #endif -struct ranap_iu_event_sccp_new_ue_context { - struct sgsn_sccp_user_iups *scu_iups; - struct osmo_sccp_addr rem_sccp_addr; - uint32_t conn_id; -}; - -struct ranap_iu_event_cl_msg_ind { - struct sgsn_sccp_user_iups *scu_iups; - struct osmo_scu_unitdata_param *ud_prim; -}; - /* Send RAB activation requests for all PDP contexts */ void activate_pdp_rabs(struct sgsn_mm_ctx *ctx) { @@ -430,9 +419,11 @@ osmo_timer_schedule(&ctx->release_timeout, timeout, 0); } -static int ranap_handle_co_initial_ue(void *ctx, RANAP_InitialUE_MessageIEs_t *ies) +static int ranap_handle_co_initial_ue(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *rem_sccp_addr, + uint32_t conn_id, + const RANAP_InitialUE_MessageIEs_t *ies) { - struct ranap_iu_event_sccp_new_ue_context *new_ctx = ctx; struct gprs_ra_id ra_id = {}; struct osmo_routing_area_id ra_id2 = {}; struct osmo_rnc_id rnc_id = {}; @@ -470,9 +461,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, &new_ctx->rem_sccp_addr); + rnc = iu_rnc_register(&rnc_id, &ra_id2, rem_sccp_addr); - ue = ue_conn_ctx_alloc(rnc, new_ctx->scu_iups, new_ctx->conn_id); + ue = ue_conn_ctx_alloc(rnc, scu_iups, conn_id); OSMO_ASSERT(ue); ue->ra_id = ra_id; @@ -485,7 +476,10 @@ return 0; } -static void cn_ranap_handle_co_initial(void *ctx, ranap_message *message) +static void cn_ranap_handle_co_initial(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *rem_sccp_addr, + uint32_t conn_id, + const ranap_message *message) { int rc; @@ -498,7 +492,7 @@ message->direction, message->procedureCode); rc = -1; } else - rc = ranap_handle_co_initial_ue(ctx, &message->msg.initialUE_MessageIEs); + rc = ranap_handle_co_initial_ue(scu_iups, rem_sccp_addr, conn_id, &message->msg.initialUE_MessageIEs); if (rc) { LOGP(DRANAP, LOGL_ERROR, "Error in %s (%d)\n", __func__, rc); @@ -506,17 +500,29 @@ } } -int sgsn_ranap_iu_rx_co_initial_msg(struct sgsn_sccp_user_iups *scu_iups, const struct osmo_sccp_addr *rem_sccp_addr, uint32_t conn_id, uint8_t *data, size_t len) +int sgsn_ranap_iu_rx_co_initial_msg(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_sccp_addr *rem_sccp_addr, + uint32_t conn_id, + const uint8_t *data, size_t len) { - struct ranap_iu_event_sccp_new_ue_context new_ctx = { - .scu_iups = scu_iups, - .conn_id = conn_id, - .rem_sccp_addr = *rem_sccp_addr, - }; - return ranap_cn_rx_co(cn_ranap_handle_co_initial, &new_ctx, data, len); + ranap_message message; + int rc; + + rc = ranap_cn_rx_co_decode2(&message, data, len); + if (rc != 0) { + LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_co_initial() due to rc=%d\n", rc); + goto free_ret; + } + + cn_ranap_handle_co_initial(scu_iups, rem_sccp_addr, conn_id, &message); + +free_ret: + /* Free the asn1 structs in message */ + ranap_cn_rx_co_free(&message); + return rc; } -static int ranap_handle_co_dt(void *ctx, RANAP_DirectTransferIEs_t *ies) +static int ranap_handle_co_dt(struct ranap_ue_conn_ctx *ue_ctx, const RANAP_DirectTransferIEs_t *ies) { struct gprs_ra_id _ra_id, *ra_id = NULL; uint16_t _sai, *sai = NULL; @@ -541,7 +547,7 @@ memcpy(msgb_gmmh(msg), ies->nas_pdu.buf, ies->nas_pdu.size); /* Feed into the MM/CC/SMS-CP layer */ - msg->dst = ctx; + msg->dst = ue_ctx; gsm0408_gprs_rcvmsg_iu(msg, ra_id, sai); msgb_free(msg); @@ -549,7 +555,7 @@ return 0; } -static int ranap_handle_co_err_ind(void *ctx, RANAP_ErrorIndicationIEs_t *ies) +static int ranap_handle_co_err_ind(struct ranap_ue_conn_ctx *ue_ctx, const RANAP_ErrorIndicationIEs_t *ies) { if (ies->presenceMask & ERRORINDICATIONIES_RANAP_CAUSE_PRESENT) LOGP(DRANAP, LOGL_ERROR, "Rx Error Indication (%s)\n", @@ -560,19 +566,19 @@ return 0; } -static int ranap_handle_co_iu_rel_req(struct ranap_ue_conn_ctx *ctx, RANAP_Iu_ReleaseRequestIEs_t *ies) +static int ranap_handle_co_iu_rel_req(struct ranap_ue_conn_ctx *ue_ctx, const RANAP_Iu_ReleaseRequestIEs_t *ies) { LOGP(DRANAP, LOGL_INFO, "Received Iu Release Request, Sending Release Command\n"); - ranap_iu_tx_release(ctx, &ies->cause); + ranap_iu_tx_release(ue_ctx, &ies->cause); return 0; } -static int ranap_handle_co_rab_ass_resp(struct ranap_ue_conn_ctx *ctx, RANAP_RAB_AssignmentResponseIEs_t *ies) +static int ranap_handle_co_rab_ass_resp(struct ranap_ue_conn_ctx *ue_ctx, const RANAP_RAB_AssignmentResponseIEs_t *ies) { int rc = -1; LOGP(DRANAP, LOGL_INFO, - "Rx RAB Assignment Response for UE conn_id %u\n", ctx->conn_id); + "Rx RAB Assignment Response for UE conn_id %u\n", ue_ctx->conn_id); if (ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT) { /* TODO: Iterate over list of SetupOrModifiedList IEs and handle each one */ RANAP_IE_t *ranap_ie = ies->raB_SetupOrModifiedList.raB_SetupOrModifiedList_ies.list.array[0]; @@ -584,7 +590,7 @@ return rc; } - rc = global_iu_event(ctx, RANAP_IU_EVENT_RAB_ASSIGN, &setup_ies); + rc = global_iu_event(ue_ctx, RANAP_IU_EVENT_RAB_ASSIGN, &setup_ies); ranap_free_rab_setupormodifieditemies(&setup_ies); } @@ -594,7 +600,7 @@ } /* Entry point for connection-oriented RANAP message */ -static void cn_ranap_handle_co(void *ctx, ranap_message *message) +static void cn_ranap_handle_co(struct ranap_ue_conn_ctx *ue_ctx, const ranap_message *message) { int rc; @@ -608,14 +614,14 @@ rc = -1; break; case RANAP_ProcedureCode_id_DirectTransfer: - rc = ranap_handle_co_dt(ctx, &message->msg.directTransferIEs); + rc = ranap_handle_co_dt(ue_ctx, &message->msg.directTransferIEs); break; case RANAP_ProcedureCode_id_ErrorIndication: - rc = ranap_handle_co_err_ind(ctx, &message->msg.errorIndicationIEs); + rc = ranap_handle_co_err_ind(ue_ctx, &message->msg.errorIndicationIEs); break; case RANAP_ProcedureCode_id_Iu_ReleaseRequest: /* Iu Release Request */ - rc = ranap_handle_co_iu_rel_req(ctx, &message->msg.iu_ReleaseRequestIEs); + rc = ranap_handle_co_iu_rel_req(ue_ctx, &message->msg.iu_ReleaseRequestIEs); break; default: LOGP(DRANAP, LOGL_ERROR, "Received Initiating Message: unknown Procedure Code %d\n", @@ -628,11 +634,11 @@ switch (message->procedureCode) { case RANAP_ProcedureCode_id_SecurityModeControl: /* Security Mode Complete */ - rc = global_iu_event(ctx, RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL); + rc = global_iu_event(ue_ctx, RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL); break; case RANAP_ProcedureCode_id_Iu_Release: /* Iu Release Complete */ - rc = global_iu_event(ctx, RANAP_IU_EVENT_IU_RELEASE, NULL); + rc = global_iu_event(ue_ctx, RANAP_IU_EVENT_IU_RELEASE, NULL); if (rc) { LOGP(DRANAP, LOGL_ERROR, "Iu Release event: Iu Event callback returned %d\n", rc); @@ -649,7 +655,7 @@ switch (message->procedureCode) { case RANAP_ProcedureCode_id_RAB_Assignment: /* RAB Assignment Response */ - rc = ranap_handle_co_rab_ass_resp(ctx, &message->msg.raB_AssignmentResponseIEs); + rc = ranap_handle_co_rab_ass_resp(ue_ctx, &message->msg.raB_AssignmentResponseIEs); break; default: LOGP(DRANAP, LOGL_ERROR, "Received Outcome: unknown Procedure Code %d\n", @@ -672,14 +678,30 @@ } } -int sgsn_ranap_iu_rx_co_msg(struct ranap_ue_conn_ctx *ue_ctx, uint8_t *data, size_t len) +int sgsn_ranap_iu_rx_co_msg(struct ranap_ue_conn_ctx *ue_ctx, const uint8_t *data, size_t len) { - return ranap_cn_rx_co(cn_ranap_handle_co, ue_ctx, data, len); + ranap_message message; + int rc; + + rc = ranap_cn_rx_co_decode2(&message, data, len); + if (rc != 0) { + LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_co() due to rc=%d\n", rc); + goto free_ret; + } + + cn_ranap_handle_co(ue_ctx, &message); + +free_ret: + /* Free the asn1 structs in message */ + ranap_cn_rx_co_free(&message); + return rc; } -static int ranap_handle_cl_reset_req(struct ranap_iu_event_cl_msg_ind *cl_msg_ind, RANAP_ResetIEs_t *ies) +static int ranap_handle_cl_reset_req(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_scu_unitdata_param *ud_prim, + const RANAP_ResetIEs_t *ies) { - RANAP_GlobalRNC_ID_t *grnc_id = NULL; + const RANAP_GlobalRNC_ID_t *grnc_id = NULL; struct msgb *resp; /* FIXME: verify ies.cN_DomainIndicator */ @@ -692,10 +714,12 @@ if (!resp) return -ENOMEM; resp->l2h = resp->data; - return osmo_sccp_tx_unitdata_msg(cl_msg_ind->scu_iups->scu, &cl_msg_ind->scu_iups->local_sccp_addr, &cl_msg_ind->ud_prim->calling_addr, resp); + return osmo_sccp_tx_unitdata_msg(scu_iups->scu, &scu_iups->local_sccp_addr, &ud_prim->calling_addr, resp); } -static int ranap_handle_cl_err_ind(struct ranap_iu_event_cl_msg_ind *cl_msg_ind, RANAP_ErrorIndicationIEs_t *ies) +static int ranap_handle_cl_err_ind(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_scu_unitdata_param *ud_prim, + const RANAP_ErrorIndicationIEs_t *ies) { if (ies->presenceMask & ERRORINDICATIONIES_RANAP_CAUSE_PRESENT) LOGP(DRANAP, LOGL_ERROR, "Rx Error Indication (%s)\n", @@ -707,9 +731,10 @@ } /* Entry point for connection-less RANAP message */ -static void cn_ranap_handle_cl(void *ctx, ranap_message *message) +static void cn_ranap_handle_cl(struct sgsn_sccp_user_iups *scu_iups, + const struct osmo_scu_unitdata_param *ud_prim, + const ranap_message *message) { - struct ranap_iu_event_cl_msg_ind *cl_msg_ind = ctx; int rc; switch (message->direction) { @@ -717,10 +742,10 @@ switch (message->procedureCode) { case RANAP_ProcedureCode_id_Reset: /* received reset.req, send reset.resp */ - rc = ranap_handle_cl_reset_req(cl_msg_ind, &message->msg.resetIEs); + rc = ranap_handle_cl_reset_req(scu_iups, ud_prim, &message->msg.resetIEs); break; case RANAP_ProcedureCode_id_ErrorIndication: - rc = ranap_handle_cl_err_ind(cl_msg_ind, &message->msg.errorIndicationIEs); + rc = ranap_handle_cl_err_ind(scu_iups, ud_prim, &message->msg.errorIndicationIEs); break; default: rc = -1; @@ -741,11 +766,23 @@ } } -int sgsn_ranap_iu_rx_cl_msg(struct sgsn_sccp_user_iups *scu_iups, struct osmo_scu_unitdata_param *ud_prim, uint8_t *data, size_t len) +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) { - struct ranap_iu_event_cl_msg_ind cl_msg_ind = { - .scu_iups = scu_iups, - .ud_prim = ud_prim, - }; - return ranap_cn_rx_cl(cn_ranap_handle_cl, &cl_msg_ind, data, len); + ranap_message message; + int rc; + + rc = ranap_cn_rx_cl_decode2(&message, data, len); + if (rc != 0) { + LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_cl() due to rc=%d\n", rc); + goto free_ret; + } + + cn_ranap_handle_cl(scu_iups, ud_prim, &message); + +free_ret: + /* Free the asn1 structs in message */ + ranap_cn_rx_cl_free(&message); + return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40960?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: Ib3c00b5105b7ba4bb1a2dad1a14bea233a03c358 Gerrit-Change-Number: 40960 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: testenv: qemu: ignore builtin modules
by fixeria 27 Aug '25

27 Aug '25
Attention is currently required from: osmith. fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40955?usp=email ) Change subject: testenv: qemu: ignore builtin modules ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40955?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ied8acf18d0a1f47fac805619d15896918a365ff2 Gerrit-Change-Number: 40955 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 27 Aug 2025 17:45:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-sgsn[master]: iu_rnc: Constify function params
by pespin 27 Aug '25

27 Aug '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/40959?usp=email ) Change subject: iu_rnc: Constify function params ...................................................................... iu_rnc: Constify function params Change-Id: I288bc21d24aa5abd3d9bd97e796ac9f8590290bd --- M include/osmocom/sgsn/iu_rnc.h M src/sgsn/iu_rnc.c 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/59/40959/1 diff --git a/include/osmocom/sgsn/iu_rnc.h b/include/osmocom/sgsn/iu_rnc.h index 345ee9c..895e922 100644 --- a/include/osmocom/sgsn/iu_rnc.h +++ b/include/osmocom/sgsn/iu_rnc.h @@ -32,4 +32,4 @@ struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id, const struct osmo_routing_area_id *rai, - struct osmo_sccp_addr *addr); + const struct osmo_sccp_addr *addr); diff --git a/src/sgsn/iu_rnc.c b/src/sgsn/iu_rnc.c index 0854f99..970f628 100644 --- a/src/sgsn/iu_rnc.c +++ b/src/sgsn/iu_rnc.c @@ -43,7 +43,7 @@ #include <osmocom/sgsn/sccp.h> #include <osmocom/sgsn/sgsn.h> -static struct ranap_iu_rnc *iu_rnc_alloc(const struct osmo_rnc_id *rnc_id, struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(const struct osmo_rnc_id *rnc_id, const struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(sgsn, struct ranap_iu_rnc); OSMO_ASSERT(rnc); @@ -98,7 +98,7 @@ return NULL; } -static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +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)); @@ -125,7 +125,7 @@ struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id, const struct osmo_routing_area_id *rai, - struct osmo_sccp_addr *addr) + const struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; struct ranap_iu_rnc *old_rnc; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40959?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: I288bc21d24aa5abd3d9bd97e796ac9f8590290bd Gerrit-Change-Number: 40959 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • ...
  • 109
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.