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

January 2025

  • 1 participants
  • 1491 discussions
[M] Change in osmo-msc[master]: Include SM-RP-UI in outgoing GSUP message when presesnt
by pespin 30 Jan '25

30 Jan '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email ) Change subject: Include SM-RP-UI in outgoing GSUP message when presesnt ...................................................................... Include SM-RP-UI in outgoing GSUP message when presesnt An SMS deliver report may be returned from the UE for any MT SMS. A common use is for remote communication with the SIM (UICC) whereby a command requires Proof of Receipt in an SMS deliver report (see 3GPP 31.115) SMS-DELIVER-REPORT TPDU is defined in 3GPP 23.040 s9.2.2.1a and carried as a RP-User-Data element within an RP-ERROR or RP-ACK PDU In 3GPP 24.011, the definition of RP-ACK (s7.3.3) and RP-ERROR (s7.3.4) shows RP-User-Data encoded as an optional TLV. In MAP (3GPP 29.002) the MSC transfers the user data in either SM-RP-UI parameter (s7.6.8.4) or SM-DeliveryFailureCause diagnosticInfo (s7.6.1h) With GSUP the osmo_gsup_message struct member sm_rp_ui is used to carry the user data in both cases. Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce --- M include/osmocom/msc/gsm_04_11_gsup.h M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c 3 files changed, 46 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/msc/gsm_04_11_gsup.h b/include/osmocom/msc/gsm_04_11_gsup.h index 4034f5e..9c8c7cf 100644 --- a/include/osmocom/msc/gsm_04_11_gsup.h +++ b/include/osmocom/msc/gsm_04_11_gsup.h @@ -12,8 +12,8 @@ int gsm411_gsup_mo_fwd_sm_req(struct gsm_trans *trans, struct msgb *msg, uint8_t sm_rp_mr, uint8_t *sm_rp_da, uint8_t sm_rp_da_len); -int gsm411_gsup_mt_fwd_sm_res(struct gsm_trans *trans, uint8_t sm_rp_mr); +int gsm411_gsup_mt_fwd_sm_res(struct gsm_trans *trans, uint8_t sm_rp_mr, const uint8_t *ui_buf, uint8_t ui_len); int gsm411_gsup_mt_fwd_sm_err(struct gsm_trans *trans, - uint8_t sm_rp_mr, uint8_t cause); + uint8_t sm_rp_mr, uint8_t cause, const uint8_t *ui_buf, uint8_t ui_len); int gsm411_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_gsup_message *gsup_msg); diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 6536d0b..b6d5f4a 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -852,7 +852,19 @@ if (trans->net->sms_over_gsup) { /* Forward towards SMSC via GSUP */ - return gsm411_gsup_mt_fwd_sm_res(trans, rph->msg_ref); + uint8_t ui_len = 0; + uint8_t *ui_buf = NULL; + /* check for: + * - sufficient size for tag, length and data + * - RP-User-Data tag + * - user data length is valid */ + if (rph->len > 2 && + rph->data[0] == GSM411_IE_RP_USER_DATA && + rph->data[1] <= (rph->len - 2)) { + ui_len = rph->data[1]; + ui_buf = &(rph->data[2]); + } + return gsm411_gsup_mt_fwd_sm_res(trans, rph->msg_ref, ui_buf, ui_len); } if (!sms) { @@ -893,7 +905,23 @@ if (trans->net->sms_over_gsup) { /* Forward towards SMSC via GSUP */ - return gsm411_gsup_mt_fwd_sm_err(trans, rph->msg_ref, cause); + uint8_t ui_len = 0; + uint8_t *ui_buf = NULL; + uint8_t ui_tag_idx = cause_len + 1; + uint8_t ui_len_idx = ui_tag_idx + 1; + uint8_t ui_buf_idx = ui_len_idx + 1; + /* check for: + * - sufficient size for tag, length and data + * - RP-User-Data tag + * - user data length is valid */ + if (rph->len > ui_buf_idx && + rph->data[ui_tag_idx] == GSM411_IE_RP_USER_DATA && + rph->data[ui_len_idx] <= (rph->len - ui_buf_idx)) { + ui_len = rph->data[ui_len_idx]; + ui_buf = &(rph->data[ui_buf_idx]); + } + + return gsm411_gsup_mt_fwd_sm_err(trans, rph->msg_ref, cause, ui_buf, ui_len); } if (!sms) { diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c index 96fdbc6..4dcc302 100644 --- a/src/libmsc/gsm_04_11_gsup.c +++ b/src/libmsc/gsm_04_11_gsup.c @@ -184,7 +184,7 @@ return -EINVAL; } -int gsm411_gsup_mt_fwd_sm_res(struct gsm_trans *trans, uint8_t sm_rp_mr) +int gsm411_gsup_mt_fwd_sm_res(struct gsm_trans *trans, uint8_t sm_rp_mr, const uint8_t *ui_buf, uint8_t ui_len) { struct osmo_gsup_message gsup_msg; @@ -202,11 +202,17 @@ gsup_msg.destination_name_len = trans->sms.gsup_source_name_len; gsup_client_mux_tx_set_source(trans->net->gcm, &gsup_msg); + /* include optional SM-RP-UI field if present */ + if (ui_len) { + gsup_msg.sm_rp_ui_len = ui_len; + gsup_msg.sm_rp_ui = ui_buf; + } + return gsup_client_mux_tx(trans->net->gcm, &gsup_msg); } int gsm411_gsup_mt_fwd_sm_err(struct gsm_trans *trans, - uint8_t sm_rp_mr, uint8_t cause) + uint8_t sm_rp_mr, uint8_t cause, const uint8_t *ui_buf, uint8_t ui_len) { struct osmo_gsup_message gsup_msg; @@ -227,7 +233,12 @@ /* SM-RP-Cause value */ gsup_msg.sm_rp_cause = &cause; - /* TODO: include optional SM-RP-UI field if present */ + /* include optional SM-RP-UI field if present */ + if (ui_len) { + gsup_msg.sm_rp_ui_len = ui_len; + gsup_msg.sm_rp_ui = ui_buf; + } + return gsup_client_mux_tx(trans->net->gcm, &gsup_msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce Gerrit-Change-Number: 39428 Gerrit-PatchSet: 5 Gerrit-Owner: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: Include SM-RP-UI in outgoing GSUP message when presesnt
by pespin 30 Jan '25

30 Jan '25
Attention is currently required from: dotsimon, lynxis lazus. pespin has posted comments on this change by dotsimon. ( https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email ) Change subject: Include SM-RP-UI in outgoing GSUP message when presesnt ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce Gerrit-Change-Number: 39428 Gerrit-PatchSet: 4 Gerrit-Owner: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 30 Jan 2025 18:04:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-msc[master]: Include SM-RP-UI in outgoing GSUP message when presesnt
by fixeria 30 Jan '25

30 Jan '25
Attention is currently required from: dotsimon, lynxis lazus. fixeria has posted comments on this change by dotsimon. ( https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email ) Change subject: Include SM-RP-UI in outgoing GSUP message when presesnt ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce Gerrit-Change-Number: 39428 Gerrit-PatchSet: 4 Gerrit-Owner: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 30 Jan 2025 18:01:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-msc[master]: Include SM-RP-UI in outgoing GSUP message when presesnt
by dotsimon 30 Jan '25

30 Jan '25
Attention is currently required from: fixeria, lynxis lazus. dotsimon has posted comments on this change by dotsimon. ( https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email ) Change subject: Include SM-RP-UI in outgoing GSUP message when presesnt ...................................................................... Patch Set 4: (3 comments) File include/osmocom/msc/gsm_04_11_gsup.h: https://gerrit.osmocom.org/c/osmo-msc/+/39428/comment/d8972fa0_a1e583cd?usp… : PS3, Line 15: uint8_t *ui_buf > `const` Done https://gerrit.osmocom.org/c/osmo-msc/+/39428/comment/b702a981_011805e2?usp… : PS3, Line 15: uint8_t ui_len, uint8_t *ui_buf > To keep it consistent with existing API (e.g. […] No worries https://gerrit.osmocom.org/c/osmo-msc/+/39428/comment/aeebe9dd_aa7c5fe6?usp… : PS3, Line 17: uint8_t *ui_buf > `const` Done -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce Gerrit-Change-Number: 39428 Gerrit-PatchSet: 4 Gerrit-Owner: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 30 Jan 2025 17:55:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: Include SM-RP-UI in outgoing GSUP message when presesnt
by dotsimon 30 Jan '25

30 Jan '25
Attention is currently required from: dotsimon, fixeria, lynxis lazus. Hello Jenkins Builder, fixeria, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Verified+1 by Jenkins Builder Change subject: Include SM-RP-UI in outgoing GSUP message when presesnt ...................................................................... Include SM-RP-UI in outgoing GSUP message when presesnt An SMS deliver report may be returned from the UE for any MT SMS. A common use is for remote communication with the SIM (UICC) whereby a command requires Proof of Receipt in an SMS deliver report (see 3GPP 31.115) SMS-DELIVER-REPORT TPDU is defined in 3GPP 23.040 s9.2.2.1a and carried as a RP-User-Data element within an RP-ERROR or RP-ACK PDU In 3GPP 24.011, the definition of RP-ACK (s7.3.3) and RP-ERROR (s7.3.4) shows RP-User-Data encoded as an optional TLV. In MAP (3GPP 29.002) the MSC transfers the user data in either SM-RP-UI parameter (s7.6.8.4) or SM-DeliveryFailureCause diagnosticInfo (s7.6.1h) With GSUP the osmo_gsup_message struct member sm_rp_ui is used to carry the user data in both cases. Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce --- M include/osmocom/msc/gsm_04_11_gsup.h M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c 3 files changed, 46 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/28/39428/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/39428?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce Gerrit-Change-Number: 39428 Gerrit-PatchSet: 4 Gerrit-Owner: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dotsimon <implorable-herd(a)yahoo.com> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-ccid-firmware[master]: tame the linter
by laforge 30 Jan '25

30 Jan '25
Attention is currently required from: Hoernchen. laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39441?usp=email ) Change subject: tame the linter ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > The linter understands code as much as grep and randomly tries to lint everything including linker s […] If @osmith has no other ideas, then I'm fine with disabling it - I still won't approve of changes introducing formatting that is clearly different than the surrounding code (see my other comments). -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39441?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I84f8637b47047bb9b8c217b0869a486ceee7243f Gerrit-Change-Number: 39441 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Thu, 30 Jan 2025 15:49:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in osmo-ccid-firmware[master]: fix usb usb reset handling by delayed soft reset
by laforge 30 Jan '25

30 Jan '25
Attention is currently required from: Hoernchen. laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39445?usp=email ) Change subject: fix usb usb reset handling by delayed soft reset ...................................................................... Patch Set 1: (2 comments) File sysmoOCTSIM/hpl/core/hpl_init.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39445/comment/4934ec45_ff… : PS1, Line 57: // _osc32kctrl_init_sources(); : // _oscctrl_init_sources(); : // _mclk_init(); : // #if _GCLK_INIT_1ST : // _gclk_init_generators_by_fref(_GCLK_INIT_1ST); : // #endif : // _oscctrl_init_referenced_generators(); > Because this serves as a reminder what must be done to run the fw without a bl + allows conveniently […] I'd recommend to put it in a #if 0 / #endif block and include a comment stating the purpose. or what about a self-explanatory ``` #define BOOT_WITHOUT_BOOTLOADER 0 #if BOOT_WITHOUT_BOOTLOADER != 0 ... #endif ``` or the like? File sysmoOCTSIM/main.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39445/comment/6dd0aad9_86… : PS1, Line 579: if(delayed_usb_reset) > the format issues happened during cleanup and merging of a dozen different branches with code in sep […] can we please avoid introducing more code that's not formatted correctly? I really don't want to have those kind of debates. 99.5% of all patches we review in gerrit are not raising obvious whitespace/formatting issues, AFAICT. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39445?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0939930a42f3009abf7e670561a123963bbd3845 Gerrit-Change-Number: 39445 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Thu, 30 Jan 2025 15:47:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in ...osmo-s1gw[master]: Add GSMTAP logging handler
by laforge 30 Jan '25

30 Jan '25
Attention is currently required from: fixeria, osmith. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39415?usp=email ) Change subject: Add GSMTAP logging handler ...................................................................... Patch Set 6: Code-Review+1 (1 comment) Patchset: PS6: I couldn't find the logger_gsmtap project in gerrit yet. Can you please make sure it exists, together with the related jenkins build verification jobs, etc? I think sooner or late we will have some commits to review for it. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39415?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Iea884e2ca146b852c64bd9f135d8c71f4c925f09 Gerrit-Change-Number: 39415 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 30 Jan 2025 13:31:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-sgsn[master]: gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabili...
by laforge 30 Jan '25

30 Jan '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39243?usp=email ) Change subject: gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabilities ...................................................................... gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabilities When the MS Network Capability is empty, expect to support at least unencrypted communications. This shouldn't be empty at all, as the minimum length of it is 2 when the MS/UE is doing an Attach Request. But when receiving a MS/UE SGSN Context via Gn, the field is optional. The MS/UE shall include it into the Routing Area Request, but not must. Change-Id: Ieef2e3eeaaadc90c35fff6f20d47bd36aaa4b9e6 --- M src/sgsn/gprs_gmm.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 80c2148..e49e611 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1201,6 +1201,10 @@ static uint8_t gprs_ms_net_cap_gea_mask(const uint8_t *ms_net_cap, uint8_t cap_len) { uint8_t mask = (1 << GPRS_ALGO_GEA0); + + if (cap_len == 0) + return mask; + mask |= (0x80 & ms_net_cap[0]) ? (1 << GPRS_ALGO_GEA1) : 0; if (cap_len < 2) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ieef2e3eeaaadc90c35fff6f20d47bd36aaa4b9e6 Gerrit-Change-Number: 39243 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-sgsn[master]: Refactor mmctx_is_r99 into mmctx.c
by laforge 30 Jan '25

30 Jan '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39242?usp=email ) Change subject: Refactor mmctx_is_r99 into mmctx.c ...................................................................... Refactor mmctx_is_r99 into mmctx.c It is related to the mmctx and should be in mmctx.c instead of the GMM message parsing or handling. Change-Id: I198a3c9d49667c70e8995808b3fcb5ea26e8f17a --- M include/osmocom/sgsn/mmctx.h M src/sgsn/gprs_gmm.c M src/sgsn/mmctx.c 3 files changed, 17 insertions(+), 14 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sgsn/mmctx.h b/include/osmocom/sgsn/mmctx.h index 03bb845..9fa06dc 100644 --- a/include/osmocom/sgsn/mmctx.h +++ b/include/osmocom/sgsn/mmctx.h @@ -282,6 +282,8 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm, uint8_t tid); +bool sgsn_mm_ctx_is_r99(const struct sgsn_mm_ctx *mm); + uint32_t sgsn_alloc_ptmsi(void); /* Called on subscriber data updates */ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 357b762..80c2148 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -479,16 +479,6 @@ return gsm48_gmm_sendmsg(msg, 1, mm, false); } -/* determine if the MS/UE supports R99 or later */ -static bool mmctx_is_r99(const struct sgsn_mm_ctx *mm) -{ - if (mm->ms_network_capa.len < 1) - return false; - if (mm->ms_network_capa.buf[0] & 0x01) - return true; - return false; -} - static enum gprs_ciph_algo gprs_ms_net_select_best_gea(uint8_t net_mask, uint8_t ms_mask) { uint8_t common_mask = net_mask & ms_mask; uint8_t r = 0; @@ -514,8 +504,8 @@ LOGMMCTXP(LOGL_INFO, mm, "<- GMM AUTH AND CIPHERING REQ (rand = %s," " mmctx_is_r99=%d, vec->auth_types=0x%x", osmo_hexdump(vec->rand, sizeof(vec->rand)), - mmctx_is_r99(mm), vec->auth_types); - if (mmctx_is_r99(mm) && vec + sgsn_mm_ctx_is_r99(mm), vec->auth_types); + if (sgsn_mm_ctx_is_r99(mm) && vec && (vec->auth_types & OSMO_AUTH_TYPE_UMTS)) { LOGPC(DMM, LOGL_INFO, ", autn = %s)\n", osmo_hexdump(vec->autn, sizeof(vec->autn))); @@ -558,7 +548,7 @@ * the optional AUTN IE. If a classic GSM SIM is * inserted, it will simply ignore AUTN and just use * RAND */ - if (mmctx_is_r99(mm) && + if (sgsn_mm_ctx_is_r99(mm) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS)) { msgb_tlv_put(msg, GSM48_IE_GMM_AUTN, sizeof(vec->autn), vec->autn); @@ -602,7 +592,7 @@ * However, on GERAN, even if we sent a UMTS AKA Authentication Request, the MS may decide to * instead reply with a GSM AKA SRES response. */ if (is_utran - || (mmctx_is_r99(ctx) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS) + || (sgsn_mm_ctx_is_r99(ctx) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS) && (res_len > sizeof(vec->sres)))) { expect_type = OSMO_AUTH_TYPE_UMTS; expect_str = "UMTS RES"; diff --git a/src/sgsn/mmctx.c b/src/sgsn/mmctx.c index e0af4ed..ae73320 100644 --- a/src/sgsn/mmctx.c +++ b/src/sgsn/mmctx.c @@ -597,3 +597,14 @@ return ggsn; } + + +/* determine if the MS/UE supports R99 or later */ +bool sgsn_mm_ctx_is_r99(const struct sgsn_mm_ctx *mm) +{ + if (mm->ms_network_capa.len < 1) + return false; + if (mm->ms_network_capa.buf[0] & 0x01) + return true; + return false; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39242?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I198a3c9d49667c70e8995808b3fcb5ea26e8f17a Gerrit-Change-Number: 39242 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.