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 -----
  • December
  • 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

  • 1 participants
  • 97203 discussions
[L] Change in libosmocore[master]: gsm: new struct and en/decoding functions for BC-IE
by falconia 30 Nov '26

30 Nov '26
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/44192?usp=email ) Change subject: gsm: new struct and en/decoding functions for BC-IE ...................................................................... gsm: new struct and en/decoding functions for BC-IE Legacy struct gsm_mncc_bearer_cap is unable to represent 14.4 kbit/s mode of CSD, which is now supported by Osmocom BSS, and even for the mandatory set of BC-IE octets for all data modes, it lacks some of the bits. Introduce a new set of structures to serve as a replacement, as well as new encoding and decoding functions using the new structs. These new structures and functions were originally developed by American 2G Cooperative as part of Hera MSC back end, interfacing to OsmoMSC via the proposed MNCC raw mode and doing our own encoding and decoding of GSM 04.08 CC messages. The present patch is a small step toward making these ThemWi functional improvements available in pure Osmocom, in addition to Osmocom+ThemWi hybrid. The structures and functions have also been extended to be usable on the mobile side of GSM, in addition to the network side. Change-Id: Ie864734fe1dfd1587bafddd4248ce69a7e066525 --- M include/osmocom/gsm/gsm48_ie.h M src/gsm/gsm48_ie.c M src/gsm/libosmogsm.map 3 files changed, 543 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/44192/1 diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h index 4768283..df733fe 100644 --- a/include/osmocom/gsm/gsm48_ie.h +++ b/include/osmocom/gsm/gsm48_ie.h @@ -2,16 +2,128 @@ #pragma once +#include <stdbool.h> #include <stdint.h> #include <string.h> #include <errno.h> +#include <osmocom/core/bits.h> #include <osmocom/core/msgb.h> #include <osmocom/core/defs.h> #include <osmocom/gsm/tlv.h> #include <osmocom/gsm/mncc.h> #include <osmocom/gsm/protocol/gsm_04_08.h> +/* The following structures are intended as a replacement for + * legacy struct gsm_mncc_bearer_cap. */ + +/* Versions of 3GPP TS 24.008 that correspond to the final round + * of enhancements to GSM define a total of 9 different GSM speech + * versions - see Table 10.5.103/3GPP TS 24.008. Therefore, + * we should support this many speech versions in our decoded + * BC-IE data structure. */ +#define OSMO_BCAP_MAX_SPEECH_VER 9 + +struct osmo_bcap_speech { + bool ctm; + uint8_t vers[OSMO_BCAP_MAX_SPEECH_VER]; + uint8_t num_vers; +}; + +/* Low-level decoding of BC-IE data portion */ + +#define OSMO_BCAP_OCT5_MAX_EXT 2 +#define OSMO_BCAP_OCT6_MAX_EXT 7 + +struct osmo_bcap_data_ll { + uint8_t octet_4; + uint8_t octet_5; + uint8_t octet_5_ext[OSMO_BCAP_OCT5_MAX_EXT]; + uint8_t octet_6; + uint8_t octet_6_ext[OSMO_BCAP_OCT6_MAX_EXT]; + uint8_t octet_7; + uint8_t extent_of_5; + uint8_t extent_of_6; + bool have_octet_7; +}; + +/* High-level decoding of BC-IE data portion */ + +struct osmo_bcap_data_hl { + /* fields from octet 4 */ + ubit_t compress; + uint8_t structure; + ubit_t duplex; + ubit_t nirr; + /* fields from octet 5 */ + uint8_t rate_adaption; + uint8_t sig_access; + /* fields from octet 5a */ + uint8_t other_itc; + uint8_t other_ra; + /* fields from octet 5b */ + uint8_t v120_params; + /* fields from octet 6 */ + ubit_t async; + /* fields from octet 6a */ + ubit_t stop_bits_ind; + ubit_t data_bits_ind; + uint8_t user_rate; + /* fields from octet 6b */ + uint8_t interm_rate; + ubit_t nic_tx; + ubit_t nic_rx; + uint8_t parity; + /* fields from octet 6c */ + uint8_t transp; + uint8_t modem_type; + /* fields from octet 6d */ + uint8_t other_modem_type; + uint8_t fnur; + /* fields from octet 6e */ + ubit_t accept_tchf144; + ubit_t accept_tchf96; + ubit_t accept_tchf48; + uint8_t max_tch_minus1; + /* fields from octet 6f */ + uint8_t uimi; + uint8_t waiur; + /* fields from octet 6g */ + ubit_t accept_tch288; + ubit_t accept_tch320; + ubit_t accept_tch432; + uint8_t asymmetry; + /* fields from octet 7 */ + uint8_t uil2p; + bool have_uil2p; +}; + +/* Low-level decoding of the complete BC-IE */ + +struct osmo_bcap_ll { + uint8_t itc; + ubit_t tmod; + ubit_t coding; + uint8_t rrq; + union { + struct osmo_bcap_speech speech; + struct osmo_bcap_data_ll data; + }; +}; + +/* High-level decoding of the complete BC-IE */ + +struct osmo_bcap_hl { + uint8_t itc; + ubit_t tmod; + ubit_t coding; + uint8_t rrq; + union { + struct osmo_bcap_speech speech; + struct osmo_bcap_data_hl data; + }; +}; + /* decode a 'called/calling/connect party BCD number' as in 10.5.4.7 */ int gsm48_decode_bcd_number(char *output, int output_len, const uint8_t *bcd_lv, int h_len) @@ -26,9 +138,18 @@ /* decode 'bearer capability' */ int gsm48_decode_bearer_cap(struct gsm_mncc_bearer_cap *bcap, const uint8_t *lv); +int osmo_gsm48_decode_bcap_ll(struct osmo_bcap_ll *lld, uint8_t ie_len, + const uint8_t *ie_val); +int osmo_gsm48_decode_bcap_hl(struct osmo_bcap_hl *bc, uint8_t ie_len, + const uint8_t *ie_val); /* encode 'bearer capability' */ int gsm48_encode_bearer_cap(struct msgb *msg, int lv_only, const struct gsm_mncc_bearer_cap *bcap); +int osmo_gsm48_encode_bcap_ll(struct msgb *msg, bool lv_only, + const struct osmo_bcap_ll *lld); +int osmo_gsm48_encode_bcap_hl(struct msgb *msg, bool lv_only, + const struct osmo_bcap_hl *bc, + bool ms_rules_6d_6e); /* decode 'call control cap' */ int gsm48_decode_cccap(struct gsm_mncc_cccap *ccap, const uint8_t *lv); /* encode 'call control cap' */ diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 866e0da..4fc5426 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -185,7 +185,7 @@ return (bcd_cur - bcd_lv); } -/*! Decode TS 04.08 Bearer Capability IE (10.5.4.5) +/*! Decode TS 04.08 Bearer Capability IE (10.5.4.5), legacy version. * \param[out] bcap Caller-provided memory for decoded output * \param[in] lv LV portion of TS 04.08 Bearer Capability * \returns 0 on success; negative on error */ @@ -315,7 +315,222 @@ return 0; } -/*! Encode TS 04.08 Bearer Capability IE (10.5.4.5) +/*! Low-level decode bearer capability IE of 3GPP TS 24.008 section 10.5.4.5. + * \param[out] lld Caller-provided memory for decoded output. + * \param[in] ie_len Length of the received BC-IE value part. + * \param[in] ie_val Value part of the received BC-IE. + * \returns 0 on success; negative on error. + */ +int osmo_gsm48_decode_bcap_ll(struct osmo_bcap_ll *lld, uint8_t ie_len, + const uint8_t *ie_val) +{ + const uint8_t *cp = ie_val; + const uint8_t *endp = ie_val + ie_len; + + memset(&lld, 0, sizeof(struct osmo_bcap_ll)); + if (cp >= endp) /* octet 3 is always mandatory */ + return -EINVAL; + lld->rrq = (*cp & 0x60) >> 5; + lld->coding = (*cp & 0x10) >> 4; + lld->tmod = (*cp & 0x08) >> 3; + lld->itc = *cp & 0x07; + switch (lld->itc) { + case GSM48_BCAP_ITCAP_SPEECH: + while (!(*cp & 0x80)) { + cp++; + if (cp >= endp) + return -EINVAL; + if ((cp == ie_val + 1) && (*cp & 0x20)) + lld->speech.ctm = true; + if (lld->speech.num_vers >= OSMO_BCAP_MAX_SPEECH_VER) + break; + lld->speech.vers[lld->speech.num_vers++] = *cp & 0x0F; + } + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + case GSM48_BCAP_ITCAP_FAX_G3: + case GSM48_BCAP_ITCAP_OTHER: + if (!(*cp & 0x80)) /* no octets 3a etc for data */ + return -EINVAL; + cp++; + if (cp >= endp) /* octet 4 is mandatory for data */ + return -EINVAL; + if (!(*cp & 0x80)) /* ... and does not allow extension */ + return -EINVAL; + lld->data.octet_4 = *cp++; + if (cp >= endp) /* octet 5 is mandatory too */ + return -EINVAL; + if ((*cp & 0x60) != 0x00) /* verify that it really is octet 5 */ + return -EINVAL; + lld->data.octet_5 = *cp; + while (!(*cp & 0x80)) { + cp++; + if (cp >= endp) + return -EINVAL; + if (lld->data.extent_of_5 >= OSMO_BCAP_OCT5_MAX_EXT) + return -EINVAL; + lld->data.octet_5_ext[lld->data.extent_of_5++] = *cp; + } + cp++; + if (cp >= endp) /* octet 6 is mandatory */ + return -EINVAL; + if ((*cp & 0x60) != 0x20) /* verify that it really is octet 6 */ + return -EINVAL; + lld->data.octet_6 = *cp; + while (!(*cp & 0x80)) { + cp++; + if (cp >= endp) + return -EINVAL; + if (lld->data.extent_of_6 >= OSMO_BCAP_OCT6_MAX_EXT) + return -EINVAL; + lld->data.octet_6_ext[lld->data.extent_of_6++] = *cp; + } + cp++; + if (cp >= endp) /* octet 7 is optional */ + break; + if ((*cp & 0x60) != 0x40) /* verify that it really is octet 7 */ + return -EINVAL; + if (!(*cp & 0x80)) /* it does not allow extension */ + return -EINVAL; + lld->data.have_octet_7 = true; + lld->data.octet_7 = *cp; + break; + default: + return -EOPNOTSUPP; + } + return 0; +} + +static void bcap_speech_dec_phase1_logic(struct osmo_bcap_hl *bc) +{ + switch (bc->rrq) { + case GSM48_BCAP_RRQ_FR_ONLY: + bc->speech.vers[0] = GSM48_BCAP_SV_FR; + bc->speech.num_vers = 1; + break; + case GSM48_BCAP_RRQ_DUAL_HR: + bc->speech.vers[0] = GSM48_BCAP_SV_HR; + bc->speech.vers[1] = GSM48_BCAP_SV_FR; + bc->speech.num_vers = 2; + break; + case GSM48_BCAP_RRQ_DUAL_FR: + bc->speech.vers[0] = GSM48_BCAP_SV_FR; + bc->speech.vers[1] = GSM48_BCAP_SV_HR; + bc->speech.num_vers = 2; + break; + } +} + +static void bcap_hl_decode_data(struct osmo_bcap_data_hl *hld, + const struct osmo_bcap_data_ll *lld) +{ + /* fields from octet 4 */ + hld->compress = (lld->octet_4 & 0x40) >> 6; + hld->structure = (lld->octet_4 & 0x30) >> 4; + hld->duplex = (lld->octet_4 & 0x08) >> 3; + hld->nirr = (lld->octet_4 & 0x02) >> 1; + /* fields from octet 5 */ + hld->rate_adaption = (lld->octet_5 & 0x18) >> 3; + hld->sig_access = lld->octet_5 & 0x07; + /* fields from octet 5a */ + if (lld->extent_of_5 >= 1) { + hld->other_itc = (lld->octet_5_ext[0] & 0x60) >> 5; + hld->other_ra = (lld->octet_5_ext[0] & 0x18) >> 3; + } + /* fields from octet 5b */ + if (lld->extent_of_5 >= 2) + hld->v120_params = lld->octet_5_ext[1]; + /* fields from octet 6 */ + hld->async = lld->octet_6 & 1; + /* fields from octet 6a */ + hld->stop_bits_ind = (lld->octet_6_ext[0] & 0x40) >> 6; + hld->data_bits_ind = (lld->octet_6_ext[0] & 0x10) >> 4; + hld->user_rate = lld->octet_6_ext[0] & 0x0F; + /* fields from octet 6b */ + hld->interm_rate = (lld->octet_6_ext[1] & 0x60) >> 5; + hld->nic_tx = (lld->octet_6_ext[1] & 0x10) >> 4; + hld->nic_rx = (lld->octet_6_ext[1] & 0x08) >> 3; + hld->parity = lld->octet_6_ext[1] & 0x07; + /* fields from octet 6c */ + hld->transp = (lld->octet_6_ext[2] & 0x60) >> 5; + hld->modem_type = lld->octet_6_ext[2] & 0x1F; + /* fields from octet 6d */ + if (lld->extent_of_6 >= 4) { + hld->other_modem_type = (lld->octet_6_ext[3] & 0x60) >> 5; + hld->fnur = lld->octet_6_ext[3] & 0x1F; + } + /* fields from octet 6e */ + if (lld->extent_of_6 >= 5) { + hld->accept_tchf144 = (lld->octet_6_ext[4] & 0x40) >> 6; + hld->accept_tchf96 = (lld->octet_6_ext[4] & 0x10) >> 4; + hld->accept_tchf48 = (lld->octet_6_ext[4] & 0x08) >> 3; + hld->max_tch_minus1 = lld->octet_6_ext[4] & 0x07; + } + /* fields from octet 6f */ + if (lld->extent_of_6 >= 6) { + hld->uimi = (lld->octet_6_ext[5] & 0x70) >> 4; + hld->waiur = lld->octet_6_ext[5] & 0x0F; + } + /* fields from octet 6g */ + if (lld->extent_of_6 >= 7) { + hld->accept_tch288 = (lld->octet_6_ext[6] & 0x40) >> 6; + hld->accept_tch320 = (lld->octet_6_ext[6] & 0x20) >> 5; + hld->accept_tch432 = (lld->octet_6_ext[6] & 0x10) >> 4; + hld->asymmetry = (lld->octet_6_ext[6] & 0x0C) >> 2; + } + /* fields from octet 7 */ + if (lld->have_octet_7) { + hld->uil2p = lld->octet_7 & 0x1F; + hld->have_uil2p = true; + } +} + +/*! High-level decode bearer capability IE of 3GPP TS 24.008 section 10.5.4.5. + * \param[out] bc Caller-provided memory for decoded output. + * \param[in] ie_len Length of the received BC-IE value part. + * \param[in] ie_val Value part of the received BC-IE. + * \returns 0 on success; negative on error. + */ +int osmo_gsm48_decode_bcap_hl(struct osmo_bcap_hl *bc, uint8_t ie_len, + const uint8_t *ie_val) +{ + struct osmo_bcap_ll lld; + int rc; + + memset(&bc, 0, sizeof(struct osmo_bcap_hl)); + rc = osmo_gsm48_decode_bcap_ll(&lld, ie_len, ie_val); + if (rc < 0) + return rc; + bc->itc = lld.itc; + bc->tmod = lld.tmod; + bc->coding = lld.coding; + bc->rrq = lld.rrq; + switch (lld.itc) { + case GSM48_BCAP_ITCAP_SPEECH: + if (lld.speech.num_vers != 0) { + memcpy(&bc->speech, &lld.speech, + sizeof(struct osmo_bcap_speech)); + } else { + bcap_speech_dec_phase1_logic(bc); + } + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + case GSM48_BCAP_ITCAP_FAX_G3: + case GSM48_BCAP_ITCAP_OTHER: + /* octets 6a, 6b and 6c are mandatory */ + if (lld.data.extent_of_6 < 3) + return -EINVAL; + bcap_hl_decode_data(&bc->data, &lld.data); + break; + default: + return -EOPNOTSUPP; + } + return 0; +} + +/*! Encode TS 04.08 Bearer Capability IE (10.5.4.5), legacy version. * \param[out] msg Message Buffer to which IE is to be appended * \param[in] lv_only Write only LV portion (1) or TLV (0) * \param[in] bcap Decoded Bearer Capability to be encoded @@ -392,6 +607,207 @@ return 0; } +/*! Low-level encode bearer capability IE of 3GPP TS 24.008 section 10.5.4.5. + * \param[out] msg Message buffer to which BC-IE is to be appended. + * \param[in] lv_only Write only LV portion (true) or TLV (false). + * \param[in] lld Low-level decoded BC-IE to be encoded. + * \returns 0 on success; negative on error. + */ +int osmo_gsm48_encode_bcap_ll(struct msgb *msg, bool lv_only, + const struct osmo_bcap_ll *lld) +{ + uint8_t buf[14]; /* max len with all optional octets included */ + uint8_t *cp = buf; + uint8_t octet_3 = 0; + uint8_t n; + + octet_3 |= lld->rrq << 5; + octet_3 |= lld->coding << 4; + octet_3 |= lld->tmod << 3; + octet_3 |= lld->itc; + switch (lld->itc) { + case GSM48_BCAP_ITCAP_SPEECH: + for (n = 0; n < lld->speech.num_vers; n++) { + *cp++ = octet_3; + octet_3 = lld->speech.vers[n]; + if (n == 0 && lld->speech.ctm) + octet_3 |= 0x20; + } + octet_3 |= 0x80; + *cp++ = octet_3; + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + case GSM48_BCAP_ITCAP_FAX_G3: + case GSM48_BCAP_ITCAP_OTHER: + octet_3 |= 0x80; + *cp++ = octet_3; + *cp++ = lld->data.octet_4; + *cp++ = lld->data.octet_5; + for (n = 0; n < lld->data.extent_of_5; n++) + *cp++ = lld->data.octet_5_ext[n]; + *cp++ = lld->data.octet_6; + for (n = 0; n < lld->data.extent_of_6; n++) + *cp++ = lld->data.octet_6_ext[n]; + if (lld->data.have_octet_7) + *cp++ = lld->data.octet_7; + break; + default: + return -EOPNOTSUPP; + } + if (lv_only) + msgb_lv_put(msg, cp - buf, buf); + else + msgb_tlv_put(msg, GSM48_IE_BEARER_CAP, cp - buf, buf); + return 0; +} + +static void bcap_enc_trim_6d_6f(struct osmo_bcap_data_ll *lld, + bool ms_rules_6d_6e) +{ + if (lld->octet_6_ext[6]) { + lld->octet_6_ext[6] |= 0x80; + lld->extent_of_6 = 7; + return; + } + if (lld->octet_6_ext[5]) { + lld->octet_6_ext[5] |= 0x80; + lld->extent_of_6 = 6; + return; + } + if (lld->octet_6_ext[4]) { + lld->octet_6_ext[4] |= 0x80; + lld->extent_of_6 = 5; + return; + } + if (lld->octet_6_ext[3]) { + if (ms_rules_6d_6e) { + lld->octet_6_ext[4] |= 0x80; + lld->extent_of_6 = 5; + } else { + lld->octet_6_ext[3] |= 0x80; + lld->extent_of_6 = 4; + } + return; + } + lld->octet_6_ext[2] |= 0x80; + lld->extent_of_6 = 3; +} + +static void bcap_hl_encode_data(struct osmo_bcap_data_ll *lld, + const struct osmo_bcap_data_hl *hld, + enum gsm48_bcap_itcap itcap, + bool ms_rules_6d_6e) +{ + lld->octet_4 = 0x80; + lld->octet_4 |= hld->compress << 6; + lld->octet_4 |= hld->structure << 4; + lld->octet_4 |= hld->duplex << 3; + lld->octet_4 |= hld->nirr << 1; + lld->octet_5 = 0; + lld->octet_5 |= hld->rate_adaption << 3; + lld->octet_5 |= hld->sig_access; + if (itcap == GSM48_BCAP_ITCAP_OTHER || + hld->rate_adaption == GSM48_BCAP_RA_OTHER) { + lld->octet_5_ext[0] = 0; + lld->octet_5_ext[0] |= (hld->other_itc) << 5; + lld->octet_5_ext[0] |= (hld->other_ra) << 3; + if (hld->other_ra == GSM48_BCAP_OTHER_RA_V120) { + lld->octet_5_ext[1] = 0x80 | hld->v120_params; + lld->extent_of_5 = 2; + } else { + lld->octet_5_ext[0] |= 0x80; + lld->extent_of_5 = 1; + } + } else { + lld->octet_5 |= 0x80; + lld->extent_of_5 = 0; + } + lld->octet_6 = 0x20; + lld->octet_6 |= hld->async; + lld->octet_6_ext[0] = 0; + lld->octet_6_ext[0] |= hld->stop_bits_ind << 6; + lld->octet_6_ext[0] |= hld->data_bits_ind << 4; + lld->octet_6_ext[0] |= hld->user_rate; + lld->octet_6_ext[1] = 0; + lld->octet_6_ext[1] |= hld->interm_rate << 5; + lld->octet_6_ext[1] |= hld->nic_tx << 4; + lld->octet_6_ext[1] |= hld->nic_rx << 3; + lld->octet_6_ext[1] |= hld->parity; + lld->octet_6_ext[2] = 0; + lld->octet_6_ext[2] |= hld->transp << 5; + lld->octet_6_ext[2] |= hld->modem_type; + /* Octets 6d through 6g: fill out all of them initially, + * then trim any unused ones. */ + lld->octet_6_ext[3] = 0; + lld->octet_6_ext[3] |= hld->other_modem_type << 5; + lld->octet_6_ext[3] |= hld->fnur; + lld->octet_6_ext[4] = 0; + lld->octet_6_ext[4] |= hld->accept_tchf144 << 6; + lld->octet_6_ext[4] |= hld->accept_tchf96 << 4; + lld->octet_6_ext[4] |= hld->accept_tchf48 << 3; + lld->octet_6_ext[4] |= hld->max_tch_minus1; + lld->octet_6_ext[5] = 0; + lld->octet_6_ext[5] |= hld->uimi << 4; + lld->octet_6_ext[5] |= hld->waiur; + lld->octet_6_ext[6] = 0; + lld->octet_6_ext[6] |= hld->accept_tch288 << 6; + lld->octet_6_ext[6] |= hld->accept_tch320 << 5; + lld->octet_6_ext[6] |= hld->accept_tch432 << 4; + lld->octet_6_ext[6] |= hld->asymmetry << 2; + bcap_enc_trim_6d_6f(lld, ms_rules_6d_6e); + if (hld->have_uil2p) { + lld->octet_7 = 0xC0 | hld->uil2p; + lld->have_octet_7 = true; + } else { + lld->have_octet_7 = false; + } +} + +/*! High-level encode bearer capability IE of 3GPP TS 24.008 section 10.5.4.5. + * \param[out] msg Message buffer to which BC-IE is to be appended. + * \param[in] lv_only Write only LV portion (true) or TLV (false). + * \param[in] bc High-level decoded BC-IE to be encoded. + * \param[in] ms_rules_6d_6e Apply MS rules for inclusion of octets 6d and 6e. + * \returns 0 on success; negative on error. + * + * TS 24.008 section 10.5.4.5.1 stipulates that extension octets through 6c + * are mandatory for all non-speech calls - but the rules for 6d through 6g + * are slightly different between MS->network and network->MS directions. + * For BC-IE emitted by MS, the rule says that if 6d is included, then 6e + * shall be included too - but in the network->MS direction, the MSC can + * trim that extension octet train at any sensible point after 6c. If the + * network needs to send non-zero FNUR or V.34 selection, but there is no + * octet 6f for UIMI, then ending at octet 6d is the normal case. + */ +int osmo_gsm48_encode_bcap_hl(struct msgb *msg, bool lv_only, + const struct osmo_bcap_hl *bc, + bool ms_rules_6d_6e) +{ + struct osmo_bcap_ll lld; + + lld.itc = bc->itc; + lld.tmod = bc->tmod; + lld.coding = bc->coding; + lld.rrq = bc->rrq; + switch (lld.itc) { + case GSM48_BCAP_ITCAP_SPEECH: + memcpy(&lld.speech, &bc->speech, + sizeof(struct osmo_bcap_speech)); + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + case GSM48_BCAP_ITCAP_FAX_G3: + case GSM48_BCAP_ITCAP_OTHER: + bcap_hl_encode_data(&lld.data, &bc->data, lld.itc, + ms_rules_6d_6e); + break; + default: + return -EOPNOTSUPP; + } + return osmo_gsm48_encode_bcap_ll(msg, lv_only, &lld); +} + /*! Decode TS 04.08 Call Control Capabilities IE (10.5.4.5a) * \param[out] ccap Caller-provided memory for decoded CC capabilities * \param[in] lv Length-Value of IE diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 88ee3ae..2cb768f 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -436,6 +436,10 @@ gsm48_mi_to_string; gsm48_chan_mode_to_vamos; gsm48_chan_mode_to_non_vamos; +osmo_gsm48_decode_bcap_hl; +osmo_gsm48_decode_bcap_ll; +osmo_gsm48_encode_bcap_hl; +osmo_gsm48_encode_bcap_ll; osmo_mobile_identity_to_str_buf; osmo_mobile_identity_to_str_c; osmo_mobile_identity_cmp; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44192?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie864734fe1dfd1587bafddd4248ce69a7e066525 Gerrit-Change-Number: 44192 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[S] Change in libosmocore[master]: gsm: fix division by zero in osmo_nri_v_limit_by_ranges()
by pespin 30 Nov '26

30 Nov '26
Attention is currently required from: bucketking657. pespin has posted comments on this change by bucketking657. ( https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email ) Change subject: gsm: fix division by zero in osmo_nri_v_limit_by_ranges() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib4571d2a8e83ee94acb75a9d9d695048ee1bf370 Gerrit-Change-Number: 44187 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Comment-Date: Mon, 30 Nov 2026 09:50:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-remsim[master]: bankd: fix handling of partial writes in worker_send_rspro()
by pespin 29 Nov '26

29 Nov '26
Attention is currently required from: fixeria. pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email ) Change subject: bankd: fix handling of partial writes in worker_send_rspro() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2c1675485404ecedb39f9ca25c234623c71cddf5 Gerrit-Change-Number: 44184 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 29 Nov 2026 21:17:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in pysim[master]: ts_31_102: EF.URSP is BER-TLV per TS 31.102 v17.14.2
by ilteris yagiztegin eroglu 29 Nov '26

29 Nov '26
ilteris yagiztegin eroglu has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/44190?usp=email ) Change subject: ts_31_102: EF.URSP is BER-TLV per TS 31.102 v17.14.2 ...................................................................... ts_31_102: EF.URSP is BER-TLV per TS 31.102 v17.14.2 TS 31.102 section 4.4.11.12 defines EF.URSP as a BER-TLV structured EF. Tested with a real card from Turk Telekom (28603). Change-Id: I420787713edc9ceea059d5c1d14e4efa404690d0 Signed-off-by: İlteriş Yağıztegin Eroğlu <ilteris(a)asenkron.com.tr> --- M pySim/ts_31_102.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/90/44190/1 diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 843f7c4..6c13c84 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -1585,7 +1585,7 @@ EF_OPL5G(service=129), EF_SUPI_NAI(service=130), EF_Routing_Indicator(service=124), - TransparentEF('4F0B', 0x0b, 'EF.URSP', + BerTlvEF('4F0B', 0x0b, 'EF.URSP', desc='UE Route Selector Policies per PLMN', service=132), EF_TN3GPPSNN(service=133), # Rel-17 additions below -- To view, visit https://gerrit.osmocom.org/c/pysim/+/44190?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I420787713edc9ceea059d5c1d14e4efa404690d0 Gerrit-Change-Number: 44190 Gerrit-PatchSet: 1 Gerrit-Owner: ilteris yagiztegin eroglu <osmocom(a)iye.be>
1 0
0 0
[S] Change in osmo-remsim[master]: bankd: fix handling of partial writes in worker_send_rspro()
by laforge 29 Nov '26

29 Nov '26
Attention is currently required from: fixeria, pespin. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email ) Change subject: bankd: fix handling of partial writes in worker_send_rspro() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2c1675485404ecedb39f9ca25c234623c71cddf5 Gerrit-Change-Number: 44184 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 29 Nov 2026 16:01:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmocore[master]: cbsp: cbsp_decode_cell_list(): validate the list length
by laforge 29 Nov '26

29 Nov '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/44178?usp=email ) Change subject: cbsp: cbsp_decode_cell_list(): validate the list length ...................................................................... cbsp: cbsp_decode_cell_list(): validate the list length Change-Id: I2d8fe20744715044ea4a54abb7cd0212246587fa Related: OS#7098 --- M src/gsm/cbsp.c M tests/smscb/cbsp_test.c M tests/smscb/cbsp_test.ok 3 files changed, 9 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index 233cbf3..bdb7369 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -528,6 +528,12 @@ return -EINVAL; } + /* remaining len must be a multiple of cell_id_size */ + if ((len - 1) == 0 || (len - 1) % cell_id_size) { + osmo_cbsp_errstr = "cell list: malformed/empty"; + return -EINVAL; + } + while (cur < buf + len) { struct osmo_cbsp_cell_ent *ent = talloc_zero(ctx, struct osmo_cbsp_cell_ent); unsigned int len_remain = len - (cur - buf); diff --git a/tests/smscb/cbsp_test.c b/tests/smscb/cbsp_test.c index f59dbc1..7ed5121 100644 --- a/tests/smscb/cbsp_test.c +++ b/tests/smscb/cbsp_test.c @@ -102,7 +102,7 @@ .hex_pdu = "1000000404000205ff", }, { - /* XXX: CELL_IDENT_LAC with missing LAC => expected failure (passes) */ + /* CELL_IDENT_LAC with missing LAC => failure */ .name = "CBSP RESET: Cell List (LAC, missing)", .hex_pdu = "1000000404000105", }, diff --git a/tests/smscb/cbsp_test.ok b/tests/smscb/cbsp_test.ok index bbc1ff0..df09370 100644 --- a/tests/smscb/cbsp_test.ok +++ b/tests/smscb/cbsp_test.ok @@ -13,10 +13,10 @@ TC[3] osmo_cbsp_decode() result: pass TC[4] 'CBSP RESET: Cell List (LAC, short)' TC[4] PDU: 1000000404000205ff -TC[4] osmo_cbsp_decode() result: cell list: error decoding cell_id_union +TC[4] osmo_cbsp_decode() result: cell list: malformed/empty TC[5] 'CBSP RESET: Cell List (LAC, missing)' TC[5] PDU: 1000000404000105 -TC[5] osmo_cbsp_decode() result: pass +TC[5] osmo_cbsp_decode() result: cell list: malformed/empty TC[6] 'CBSP RESET: Cell List (malformed TLV)' TC[6] PDU: 100000040400ff05 TC[6] osmo_cbsp_decode() result: error -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44178?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2d8fe20744715044ea4a54abb7cd0212246587fa Gerrit-Change-Number: 44178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: cbsp: cbsp_decode_cell_list(): do not reject empty cell list
by laforge 29 Nov '26

29 Nov '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/44177?usp=email ) Change subject: cbsp: cbsp_decode_cell_list(): do not reject empty cell list ...................................................................... cbsp: cbsp_decode_cell_list(): do not reject empty cell list 190fd93f broke CBSP TCs in ttcn3-bsc-test. The testsuite sends an empty cell list with id_discr set to CELL_IDENT_BSS. Apparently, this is legal and osmo-bsc interprets this as "all served cells". Change-Id: If69ae9a90fe2e582c909386d6fe6f32f017591af Fixes: 190fd93f ("cbsp: cbsp_decode_cell_list(): fix endless loop iteration") Related: OS#7098 --- M src/gsm/cbsp.c M tests/smscb/cbsp_test.c M tests/smscb/cbsp_test.ok 3 files changed, 11 insertions(+), 8 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index 18b8226..233cbf3 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -521,8 +521,10 @@ cl->id_discr = *cur++; cell_id_size = gsm0808_cell_id_size(cl->id_discr); - if (cell_id_size <= 0) { - osmo_cbsp_errstr = "cell list: unexpected cell_id_size"; + if (cell_id_size == 0) + return 0; /* empty list, nothing to parse */ + if (cell_id_size < 0) { + osmo_cbsp_errstr = "cell list: unexpected cell_id_discr"; return -EINVAL; } diff --git a/tests/smscb/cbsp_test.c b/tests/smscb/cbsp_test.c index 43b921c..f59dbc1 100644 --- a/tests/smscb/cbsp_test.c +++ b/tests/smscb/cbsp_test.c @@ -81,12 +81,13 @@ .hex_pdu = "0300002c0e003103417009000f0009f1070018003003012711c3510f04000f0009f1070017002a09f1070018002a1200", }, { - /* XXX: CELL_IDENT_BSS => empty cell list (fails) */ + /* CELL_IDENT_BSS => empty cell list */ .name = "CBSP RESET: Cell List (BSS)", .hex_pdu = "1000000404000106", }, { - /* XXX: CELL_IDENT_NO_CELL is not listed in 3GPP TS 48.049, 8.2.6 (fails) */ + /* CELL_IDENT_NO_CELL is not listed in 3GPP TS 48.049, 8.2.6, + * but we still parse it as an empty cell list */ .name = "CBSP RESET: Cell List (NO_CELL)", .hex_pdu = "1000000404000103", }, diff --git a/tests/smscb/cbsp_test.ok b/tests/smscb/cbsp_test.ok index f869d71..bbc1ff0 100644 --- a/tests/smscb/cbsp_test.ok +++ b/tests/smscb/cbsp_test.ok @@ -4,13 +4,13 @@ TC[0] osmo_cbsp_decode() result: pass TC[1] 'CBSP RESET: Cell List (BSS)' TC[1] PDU: 1000000404000106 -TC[1] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[1] osmo_cbsp_decode() result: pass TC[2] 'CBSP RESET: Cell List (NO_CELL)' TC[2] PDU: 1000000404000103 -TC[2] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[2] osmo_cbsp_decode() result: pass TC[3] 'CBSP RESET: Cell List (NO_CELL) with trailing bytes' TC[3] PDU: 1000000404000303ffff -TC[3] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[3] osmo_cbsp_decode() result: pass TC[4] 'CBSP RESET: Cell List (LAC, short)' TC[4] PDU: 1000000404000205ff TC[4] osmo_cbsp_decode() result: cell list: error decoding cell_id_union @@ -22,5 +22,5 @@ TC[6] osmo_cbsp_decode() result: error TC[7] 'CBSP RESET: Cell List (unknown discriminator)' TC[7] PDU: 100000040400010f -TC[7] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[7] osmo_cbsp_decode() result: cell list: unexpected cell_id_discr === test_decode end === -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44177?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If69ae9a90fe2e582c909386d6fe6f32f017591af Gerrit-Change-Number: 44177 Gerrit-PatchSet: 1 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>
1 0
0 0
[M] Change in libosmocore[master]: tests/smscb_cbsp: add more decode test cases
by laforge 29 Nov '26

29 Nov '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/44176?usp=email ) Change subject: tests/smscb_cbsp: add more decode test cases ...................................................................... tests/smscb_cbsp: add more decode test cases Some test cases are currently failing/passing unexpectedly. This will be addressed in follow-up patches. Change-Id: I70e40ac8cd8b6443fa4ef9246e45332c438a95b5 Related: OS#7097, OS#7098 --- M tests/smscb/cbsp_test.c M tests/smscb/cbsp_test.ok 2 files changed, 88 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/smscb/cbsp_test.c b/tests/smscb/cbsp_test.c index 2dbdded..43b921c 100644 --- a/tests/smscb/cbsp_test.c +++ b/tests/smscb/cbsp_test.c @@ -26,6 +26,14 @@ #include <osmocom/gsm/protocol/gsm_48_049.h> #include <osmocom/gsm/cbsp.h> +struct test_case { + const char *name; + const char *hex_pdu; + bool exp_failure; +}; + +static const struct test_case test_case_list[] = { + { /* CBSP WRITE-REPLACE FAILURE Message Type: WRITE-REPLACE FAILURE (3) @@ -69,8 +77,45 @@ Information Element Identifier: Channel Indicator (18) Channel Indicator: basic channel (0x00) */ -static const char write_repl_fail_with_failure_list[] = - "0300002c0e003103417009000f0009f1070018003003012711c3510f04000f0009f1070017002a09f1070018002a1200"; + .name = "CBSP WRITE-REPLACE FAILURE", + .hex_pdu = "0300002c0e003103417009000f0009f1070018003003012711c3510f04000f0009f1070017002a09f1070018002a1200", + }, + { + /* XXX: CELL_IDENT_BSS => empty cell list (fails) */ + .name = "CBSP RESET: Cell List (BSS)", + .hex_pdu = "1000000404000106", + }, + { + /* XXX: CELL_IDENT_NO_CELL is not listed in 3GPP TS 48.049, 8.2.6 (fails) */ + .name = "CBSP RESET: Cell List (NO_CELL)", + .hex_pdu = "1000000404000103", + }, + { + /* same as the previos one, but with trailing bytes (ignored) */ + .name = "CBSP RESET: Cell List (NO_CELL) with trailing bytes", + .hex_pdu = "1000000404000303ffff", + }, + { + /* CELL_IDENT_LAC with short LAC => failure */ + .name = "CBSP RESET: Cell List (LAC, short)", + .hex_pdu = "1000000404000205ff", + }, + { + /* XXX: CELL_IDENT_LAC with missing LAC => expected failure (passes) */ + .name = "CBSP RESET: Cell List (LAC, missing)", + .hex_pdu = "1000000404000105", + }, + { + /* CELL_IDENT_LAC with malformed length => failure */ + .name = "CBSP RESET: Cell List (malformed TLV)", + .hex_pdu = "100000040400ff05", + }, + { + /* unknown cell identification discriminator => failure */ + .name = "CBSP RESET: Cell List (unknown discriminator)", + .hex_pdu = "100000040400010f", + }, +}; static struct msgb *msgb_from_hex(unsigned int size, const char *hex) { @@ -88,14 +133,25 @@ printf("=== %s start ===\n", __func__); - msg = msgb_from_hex(sizeof(write_repl_fail_with_failure_list), - write_repl_fail_with_failure_list); + for (unsigned int i = 0; i < ARRAY_SIZE(test_case_list); i++) { + const struct test_case *tc = &test_case_list[i]; + const char *verdict; - cbsp_dec = osmo_cbsp_decode(NULL, msg); - OSMO_ASSERT(cbsp_dec); + printf("TC[%u] '%s'\n", i, tc->name); + printf("TC[%u] PDU: %s\n", i, tc->hex_pdu); - talloc_free(cbsp_dec); - msgb_free(msg); + msg = msgb_from_hex(strlen(tc->hex_pdu), tc->hex_pdu); + + cbsp_dec = osmo_cbsp_decode(NULL, msg); + if (cbsp_dec != NULL) + verdict = "pass"; + else /* osmo_cbsp_errstr may be unset (NULL) */ + verdict = osmo_cbsp_errstr ? : "error"; + printf("TC[%u] osmo_cbsp_decode() result: %s\n", i, verdict); + + talloc_free(cbsp_dec); + msgb_free(msg); + } printf("=== %s end ===\n", __func__); } diff --git a/tests/smscb/cbsp_test.ok b/tests/smscb/cbsp_test.ok index a837de5..f869d71 100644 --- a/tests/smscb/cbsp_test.ok +++ b/tests/smscb/cbsp_test.ok @@ -1,2 +1,26 @@ === test_decode start === +TC[0] 'CBSP WRITE-REPLACE FAILURE' +TC[0] PDU: 0300002c0e003103417009000f0009f1070018003003012711c3510f04000f0009f1070017002a09f1070018002a1200 +TC[0] osmo_cbsp_decode() result: pass +TC[1] 'CBSP RESET: Cell List (BSS)' +TC[1] PDU: 1000000404000106 +TC[1] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[2] 'CBSP RESET: Cell List (NO_CELL)' +TC[2] PDU: 1000000404000103 +TC[2] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[3] 'CBSP RESET: Cell List (NO_CELL) with trailing bytes' +TC[3] PDU: 1000000404000303ffff +TC[3] osmo_cbsp_decode() result: cell list: unexpected cell_id_size +TC[4] 'CBSP RESET: Cell List (LAC, short)' +TC[4] PDU: 1000000404000205ff +TC[4] osmo_cbsp_decode() result: cell list: error decoding cell_id_union +TC[5] 'CBSP RESET: Cell List (LAC, missing)' +TC[5] PDU: 1000000404000105 +TC[5] osmo_cbsp_decode() result: pass +TC[6] 'CBSP RESET: Cell List (malformed TLV)' +TC[6] PDU: 100000040400ff05 +TC[6] osmo_cbsp_decode() result: error +TC[7] 'CBSP RESET: Cell List (unknown discriminator)' +TC[7] PDU: 100000040400010f +TC[7] osmo_cbsp_decode() result: cell list: unexpected cell_id_size === test_decode end === -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44176?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I70e40ac8cd8b6443fa4ef9246e45332c438a95b5 Gerrit-Change-Number: 44176 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmocore[master]: cbsp: cbsp_decode_cell_list(): tweak coding style
by laforge 29 Nov '26

29 Nov '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/44179?usp=email ) Change subject: cbsp: cbsp_decode_cell_list(): tweak coding style ...................................................................... cbsp: cbsp_decode_cell_list(): tweak coding style Change-Id: Icf9db71afe482c139cd07ca1a3df308af6877b4a --- M src/gsm/cbsp.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index bdb7369..2198c02 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -513,7 +513,8 @@ if (buf == NULL) { osmo_cbsp_errstr = "cell list: missing mandatory IE"; return -ENOENT; - } else if (len < 1) { + } + if (len < 1) { osmo_cbsp_errstr = "cell list: too short"; return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44179?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icf9db71afe482c139cd07ca1a3df308af6877b4a Gerrit-Change-Number: 44179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: cbsp: cbsp_decode_cell_list(): validate the list length
by laforge 29 Nov '26

29 Nov '26
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/44178?usp=email ) Change subject: cbsp: cbsp_decode_cell_list(): validate the list length ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44178?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2d8fe20744715044ea4a54abb7cd0212246587fa Gerrit-Change-Number: 44178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 29 Nov 2026 16:01:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • ...
  • 9721
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.