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

June 2023

  • 1 participants
  • 2480 discussions
[M] Change in osmo-ttcn3-hacks[master]: BTS_Tests: Add support for PCUIF protocol version 11
by pespin 23 Jun '23

23 Jun '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418 ) Change subject: BTS_Tests: Add support for PCUIF protocol version 11 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I08de02e951e10bc8b4381cc2ad32e63f2747e3c4 Gerrit-Change-Number: 33418 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Jun 2023 15:11:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: PCUIF_Types: fix record PCUIF_pch_dt
by pespin 23 Jun '23

23 Jun '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 ) Change subject: PCUIF_Types: fix record PCUIF_pch_dt ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67 Gerrit-Change-Number: 33417 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Jun 2023 15:10:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: PCUIF_Types: fix record PCUIF_pch_dt
by dexter 23 Jun '23

23 Jun '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 ) Change subject: PCUIF_Types: fix record PCUIF_pch_dt ...................................................................... PCUIF_Types: fix record PCUIF_pch_dt The record PCUIF_pch_dt uses ALIGN(left) variants for imsi data. This is not correct, since it would pad the data with zeros if it does not fit the specified length. This is unwanted in particular in the case of the IMSI since the struct also allows for IMSIs shorter than 17 characters as long as the minimum lenght is 3. Related: OS#5927 Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67 --- M library/PCUIF_Types.ttcn 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/33417/1 diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 5ddcc9e..8f5d4eb 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -320,8 +320,8 @@ octetstring data length(23) } with { variant (tlli) "BYTEORDER(last)" - variant (imsi) "FIELDLENGTH(17), ALIGN(left)" - variant (data) "FIELDLENGTH(23), ALIGN(left)" + variant (imsi) "FIELDLENGTH(17)" + variant (data) "FIELDLENGTH(23)" }; type union PCUIF_MsgUnion { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67 Gerrit-Change-Number: 33417 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: BTS_Tests: Add support for PCUIF protocol version 11
by dexter 23 Jun '23

23 Jun '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418 ) Change subject: BTS_Tests: Add support for PCUIF protocol version 11 ...................................................................... BTS_Tests: Add support for PCUIF protocol version 11 The PCUIF protocol version 11 uses a more distinct (direct TLLI) way to signal PAGING COMMAND and IMMEDIATE ASSIGNMENT messages towards the PCU. Since OsmoBTS will soon fully support v.11 of the PCUIF protocol we need to add compatibility in the OsmoBTS TTCN3 testsuite early. We also have to stay compatible with older versions of OsmoBTS. The BTS_Tests.default config still sets up mp_pcuif_version to version 10, so this will be the default until we have full version 11 support in current master and latest. Related: OS#5927 Change-Id: I08de02e951e10bc8b4381cc2ad32e63f2747e3c4 --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn 3 files changed, 72 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/18/33418/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index fddfcca..f59cc89 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -5812,8 +5812,17 @@ f_l1_tune(L1CTL); f_TC_pcu_act_req(0, 0, 7, true); - /* three characters prefix: last 3 digits of IMSI as ASCII */ - f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PCH, '313233'O & c_PCU_DATA); + + if (mp_pcuif_version < 11) { + /* three characters prefix: last 3 digits of IMSI as ASCII */ + f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PCH, '313233'O & c_PCU_DATA); + } else { + var PCUIF_pch_dt pch_dt; + pch_dt.tlli := '01020304'O; + pch_dt.imsi := "00101000000000123"; + pch_dt.data := c_PCU_DATA; + f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PCH_DT, enc_PCUIF_pch_dt(pch_dt)); + } T.start; alt { diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index f3e4810..dd689c9 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -15,6 +15,7 @@ import from PCUIF_Types all; import from UD_PortType all; import from UD_Types all; +import from General_Types all; type record PCUIF_send_data { PCUIF_Message data, @@ -139,18 +140,27 @@ } function f_PCUIF_tx_imm_ass_pch(PCUIF_CODEC_PT pt, integer conn_id, octetstring imm_ass, hexstring imsi, - uint8_t bts_nr := 0, boolean wait_for_cnf := true) return uint32_t { + uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 tlli := '01020304'O) return uint32_t { var PCUIF_send_data sd; timer T := 3.0; - /* append 3 last imsi digits so BTS can compute pagng group */ - var hexstring last_digits := substr(imsi, lengthof(imsi)-3, 3); - var octetstring prefix := ''O; - log("3 last imsi digits: ", last_digits); - for (var integer i := 0; i < 3; i := i+1) { - prefix := prefix & int2oct(hex2int('30'H) + hex2int(last_digits[i]), 1); - } - pt.send(t_SD_PCUIF(conn_id, + + if (mp_pcuif_version < 11) { + /* append 3 last imsi digits so that the BTS is able to compute paging group */ + var hexstring last_digits := substr(imsi, lengthof(imsi)-3, 3); + log("3 last imsi digits: ", last_digits); + var octetstring prefix := ''O; + for (var integer i := 0; i < 3; i := i+1) { + prefix := prefix & int2oct(hex2int('30'H) + hex2int(last_digits[i]), 1); + } + pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH, prefix & imm_ass))); + } else { + var PCUIF_pch_dt pch_dt; + pch_dt.tlli := tlli; + pch_dt.imsi := hex2str(imsi); + pch_dt.data := imm_ass; + pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_DT, enc_PCUIF_pch_dt(pch_dt)))); + } /* Exit early when the caller is not interested in the confirmation message */ if (wait_for_cnf == false) { @@ -159,10 +169,24 @@ T.start; alt { - [] pt.receive(t_SD_PCUIF(conn_id, - tr_PCUIF_DATA_CNF(bts_nr, 0, 0, PCU_IF_SAPI_PCH))) -> value sd { - log("IMM.ASS was sent on fn ", sd.data.u.data_cnf.fn); - return sd.data.u.data_cnf.fn; + [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF(bts_nr, 0, 0, PCU_IF_SAPI_PCH))) -> value sd { + if (mp_pcuif_version >= 11) { + setverdict(fail, "expecting tr_PCUIF_DATA_CNF_DT in PCUIF v.11 or later"); + mtc.stop; + } else { + log("IMM.ASS was sent on fn ", sd.data.u.data_cnf.fn); + return sd.data.u.data_cnf.fn; + } + } + + [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_DT(bts_nr, 0, 0, PCU_IF_SAPI_PCH_DT))) -> value sd { + if (mp_pcuif_version < 11) { + setverdict(fail, "expecting tr_PCUIF_DATA_CNF in PCUIF v.10 or earlier"); + mtc.stop; + } else { + log("IMM.ASS was sent on fn ", sd.data.u.data_cnf_dt.fn); + return sd.data.u.data_cnf_dt.fn; + } } [] pt.receive { repeat; } [] T.timeout { diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 8f5d4eb..0658f68 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -17,11 +17,11 @@ modulepar { /* PCUIF version supported by the IUT */ - PCUIF_Version mp_pcuif_version := 10; + PCUIF_Version mp_pcuif_version := 11; }; const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; -type integer PCUIF_Version (9..10); /* supported versions */ +type integer PCUIF_Version (9..11); /* supported versions */ type enumerated PCUIF_MsgType { PCU_IF_MSG_DATA_REQ ('00'O), @@ -373,7 +373,8 @@ with { extension "prototype(convert) encode(RAW)" }; external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message with { extension "prototype(convert) decode(RAW)" }; - +external function enc_PCUIF_pch_dt(in PCUIF_pch_dt pdu) return octetstring + with { extension "prototype(convert) encode(RAW)" }; /* Generic template for matching messages by type and/or the BTS number */ template PCUIF_Message tr_PCUIF_MSG(template PCUIF_MsgType msg_type := ?, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I08de02e951e10bc8b4381cc2ad32e63f2747e3c4 Gerrit-Change-Number: 33418 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-pcu[master]: tbf_ul: Avoid processing rx UL bocks for UL TBFs in RELEASING state
by pespin 23 Jun '23

23 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33415 ) Change subject: tbf_ul: Avoid processing rx UL bocks for UL TBFs in RELEASING state ...................................................................... tbf_ul: Avoid processing rx UL bocks for UL TBFs in RELEASING state Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460 --- M src/tbf_ul.cpp 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/33415/1 diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 9a139ba..4a5df6b 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -258,6 +258,18 @@ "V(R)=%d)\n", rlc->tfi, this->m_window.v_q(), this->m_window.v_r()); + if (tbf_state(this) == TBF_ST_RELEASING) { + /* This may happen if MAX_N3101 is hit previously, moving the UL + * TBF to RELEASING state. Since we have an fn-advance where DL + * blocks are scheduled in advance, we may requested USF for this + * UL TBF before triggering and hence we are now receiving a UL + * block from it. If this is the case, simply ignore the block. + */ + LOGPTBFUL(this, LOGL_INFO, + "UL DATA TFI=%d received (V(Q)=%d .. V(R)=%d) while in RELEASING state, discarding\n", + rlc->tfi, this->m_window.v_q(), this->m_window.v_r()); + } + /* process RSSI */ gprs_rlcmac_rssi(this, rssi); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33415 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460 Gerrit-Change-Number: 33415 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-pcu[master]: tbf_ul_fsm: Delay moving ul_tbf to FLOW
by pespin 23 Jun '23

23 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33416 ) Change subject: tbf_ul_fsm: Delay moving ul_tbf to FLOW ...................................................................... tbf_ul_fsm: Delay moving ul_tbf to FLOW Otherwise the scheduler selects the UL TBF for USF during that time, and of course no one has that USF assigned yet, so no answer and that ends up triggering MAX_N3101 on the UL TBF. This is specially important when PCU is connected to the BSC, since the amount of time for the ImmAss to be scheduled on the BTS and reach the MS can be bigger. Change-Id: I48babd70ca44f11110240cbcfbab43d0e3a0fb59 --- M src/tbf_ul_fsm.c M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/types/TypesTest.err 4 files changed, 98 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/33416/1 diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c index a26d161..49849ba 100644 --- a/src/tbf_ul_fsm.c +++ b/src/tbf_ul_fsm.c @@ -89,7 +89,7 @@ switch (event) { case TBF_EV_ASSIGN_ADD_CCCH: mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, true); - tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW); + tbf_ul_fsm_state_chg(fi, TBF_ST_ASSIGN); ul_tbf_contention_resolution_start(ctx->ul_tbf); break; case TBF_EV_ASSIGN_ADD_PACCH: @@ -126,6 +126,22 @@ "Starting timer T3168 [UL TBF Ass (PACCH)] with %u sec. %u microsec\n", sec, micro); osmo_timer_schedule(&fi->timer, sec, micro); + } else if (ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)) { + /* Wait a bit for the AGCH ImmAss[PktUlAss] sent BSC->BTS to + * arrive at the MS, and for the MS to jump and starting + * listening on USFs in the assigned PDCH. + * Ideally we would first wait for TBF_EV_ASSIGN_PCUIF_CNF to + * account for queueing time, but that's only sent for data on PCH + * so far, while ImmAss for UL TBF is sent on AGCH. + */ + fi->T = -2002; + val = osmo_tdef_get(the_pcu->T_defs, fi->T, OSMO_TDEF_MS, -1); + sec = val / 1000; + micro = (val % 1000) * 1000; + LOGPTBFUL(ctx->ul_tbf, LOGL_DEBUG, + "Starting timer X2002 [assignment (AGCH)] with %u sec. %u microsec\n", + sec, micro); + osmo_timer_schedule(&fi->timer, sec, micro); } } @@ -152,6 +168,10 @@ } tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW); break; + case TBF_EV_ASSIGN_READY_CCCH: + /* change state to FLOW, so scheduler will start requesting USF */ + tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW); + break; default: OSMO_ASSERT(0); } @@ -259,6 +279,9 @@ { struct tbf_ul_fsm_ctx *ctx = (struct tbf_ul_fsm_ctx *)fi->priv; switch (fi->T) { + case -2002: + osmo_fsm_inst_dispatch(fi, TBF_EV_ASSIGN_READY_CCCH, NULL); + break; case 3168: LOGPTBFUL(ctx->ul_tbf, LOGL_NOTICE, "Releasing due to UL TBF PACCH assignment timeout\n"); /* fall-through */ @@ -286,7 +309,8 @@ .in_event_mask = X(TBF_EV_ASSIGN_ADD_CCCH) | X(TBF_EV_ASSIGN_ADD_PACCH) | - X(TBF_EV_ASSIGN_ACK_PACCH), + X(TBF_EV_ASSIGN_ACK_PACCH) | + X(TBF_EV_ASSIGN_READY_CCCH), .out_state_mask = X(TBF_ST_FLOW) | X(TBF_ST_FINISHED), diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bf30891..0205f2b 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -650,10 +650,18 @@ tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_UL_TBF, &pdch->trx->trx_no, -1); + /* We set X2002 timeout to 0 here to get immediate trigger through osmo_select_main() below */ + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2002, 0, OSMO_TDEF_MS) == 0); bts_handle_rach(bts, 0x03, *fn, qta); ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, pdch->trx->trx_no, pdch->ts_no); OSMO_ASSERT(ul_tbf != NULL); + OSMO_ASSERT(ul_tbf->state_is(TBF_ST_ASSIGN)); + + /* ImmAss has been sent PCU=PCUIF=>BTS. This means UL TBF is in state + * ASSIGN with X2002 armed. It will move to FLOW once it expires. */ + osmo_select_main(0); + OSMO_ASSERT(ul_tbf->state_is(TBF_ST_FLOW)); OSMO_ASSERT(ul_tbf->ta() == qta / 4); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 83bf6db..e582807 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -2271,11 +2271,15 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 PDCH(bts=0,trx=0,ts=7) FN=2654167 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW} TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) @@ -2337,11 +2341,15 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 PDCH(bts=0,trx=0,ts=7) FN=2654167 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW} TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) @@ -3225,11 +3233,15 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654283 +UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654283 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002 +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH +UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW} TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) @@ -9317,8 +9329,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0 @@ -9348,8 +9361,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-1:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-1:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-1:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-1:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-1:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-1:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-1:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=1 USF=1 @@ -9379,8 +9393,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-2:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-2:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-2:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-2:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-2:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-2:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-2:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=2 USF=2 @@ -9410,8 +9425,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-3:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-3:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-3:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-3:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-3:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-3:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-3:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=3 USF=3 @@ -9441,8 +9457,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-4:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-4:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-4:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-4:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-4:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-4:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-4:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=4 USF=4 @@ -9472,8 +9489,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-5:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-5:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-5:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-5:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-5:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-5:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-5:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=5 USF=5 @@ -9503,8 +9521,9 @@ MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf) UL_TBF(UL:TFI-0-0-6:G){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-6:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-6:G){NEW}: state_chg to FLOW -TBF(UL:TFI-0-0-6:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 +UL_TBF(UL:TFI-0-0-6:G){NEW}: state_chg to ASSIGN +TBF(UL:TFI-0-0-6:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec +TBF(UL:TFI-0-0-6:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167 MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf) Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7 Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=6 USF=6 @@ -9527,25 +9546,25 @@ MS(TA-220:MSCLS-0-0) Destroying MS object Tx Immediate Assignment Reject on AGCH MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-6:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-6:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-5:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-5:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-4:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-4:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-3:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-3:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-2:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-2:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-1:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-1:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) MS(TA-7:MSCLS-0-0:UL) Destroying MS object -MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-0:G){FLOW} +MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-0:G){ASSIGN} MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-) === end test_immediate_assign_rej_multi_block === === start test_immediate_assign_rej_single_block === diff --git a/tests/types/TypesTest.err b/tests/types/TypesTest.err index 4c20672..55453c9 100644 --- a/tests/types/TypesTest.err +++ b/tests/types/TypesTest.err @@ -41,7 +41,7 @@ TBF(UL:TFI-0-0-0:E){NEW} setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0) UL_TBF(UL:TFI-0-0-0:E){NEW}: Received Event ASSIGN_ADD_CCCH TBF(UL:TFI-0-0-0:E){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0] -UL_TBF(UL:TFI-0-0-0:E){NEW}: state_chg to FLOW +UL_TBF(UL:TFI-0-0-0:E){NEW}: state_chg to ASSIGN ************** Test with empty window ************** Test with 1 lost packet ************** Test with compressed window -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33416 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I48babd70ca44f11110240cbcfbab43d0e3a0fb59 Gerrit-Change-Number: 33416 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: modem: properly handle Dedicated mode or TBF IE
by pespin 23 Jun '23

23 Jun '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33414 ) Change subject: modem: properly handle Dedicated mode or TBF IE ...................................................................... Patch Set 3: Code-Review+1 (2 comments) File src/host/layer23/src/modem/grr.c: https://gerrit.osmocom.org/c/osmocom-bb/+/33414/comment/3e784f71_69f81105 PS3, Line 264: LOGP(DRR, LOGL_INFO, probably fits in one line (same line 271) https://gerrit.osmocom.org/c/osmocom-bb/+/33414/comment/c7c3b626_695fc9ee PS3, Line 278: if ((dm_or_tbf & (1 << 1)) == 0) { it is not clear by looking at this conditon + comment whether the if condition is UL TBF or DL TBF -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33414 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Idb9b3203147be3b42256c0bcab3ecdabcf2d2fa9 Gerrit-Change-Number: 33414 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Jun 2023 13:46:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-hnbgw[master]: ranap_rab_ass: be sure to initialize memory with 0
by neels 23 Jun '23

23 Jun '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33391 ) Change subject: ranap_rab_ass: be sure to initialize memory with 0 ...................................................................... ranap_rab_ass: be sure to initialize memory with 0 When we use the ASN.1 decoder functions, we often reserve some memory on the stack to store the results. (e.g. RANAP_RAB_xy_t _RANAP_RAB_xy;). Then we assign the memory location to a pointer variable (e.g. RANAP_RAB_xy = &_RANAP_RAB_xy). We do this for cosmetic reasons but we may end up with an uninitialized buffer, which may cause trouble lateron. Let's be consistent and make sure that those buffers are initialized with zeros. Change-Id: I7a8a951ccd8c9ae3923261468c0755192894a84b --- M src/osmo-hnbgw/ranap_rab_ass.c 1 file changed, 25 insertions(+), 11 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c index e8addcd..fe42803 100644 --- a/src/osmo-hnbgw/ranap_rab_ass.c +++ b/src/osmo-hnbgw/ranap_rab_ass.c @@ -41,11 +41,9 @@ { int rc; struct msgb *msg; - RANAP_RAB_AssignmentRequest_t _rab_assignment_request; + RANAP_RAB_AssignmentRequest_t _rab_assignment_request = { 0 }; RANAP_RAB_AssignmentRequest_t *rab_assignment_request = &_rab_assignment_request; - memset(rab_assignment_request, 0, sizeof(*rab_assignment_request)); - rc = ranap_encode_rab_assignmentrequesties(rab_assignment_request, rab_assignment_request_ies); if (rc < 0) return NULL; @@ -72,11 +70,10 @@ int rc; struct msgb *msg; - RANAP_RAB_AssignmentResponse_t _rab_assignment_response; + RANAP_RAB_AssignmentResponse_t _rab_assignment_response = { 0 }; RANAP_RAB_AssignmentResponse_t *rab_assignment_response = &_rab_assignment_response; memset(data, 0, len); - memset(rab_assignment_response, 0, sizeof(*rab_assignment_response)); rc = ranap_encode_rab_assignmentresponseies(rab_assignment_response, rab_assignment_response_ies); if (rc < 0) @@ -315,7 +312,7 @@ RANAP_RAB_AssignmentRequestIEs_t *ies, unsigned int index) { RANAP_ProtocolIE_FieldPair_t *protocol_ie_field_pair; - RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first; + RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first = { 0 }; RANAP_RAB_SetupOrModifyItemFirst_t *rab_setup_or_modify_item_first = &_rab_setup_or_modify_item_first; RANAP_TransportLayerAddress_t *trasp_layer_addr; RANAP_IuTransportAssociation_t *transp_assoc; @@ -384,7 +381,7 @@ * \returns 0 on success; negative on error. */ int ranap_rab_ass_resp_ies_extract_inet_addr(struct osmo_sockaddr *addr, RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id) { - RANAP_RAB_SetupOrModifiedItemIEs_t _rab_setup_or_modified_items_ies; + RANAP_RAB_SetupOrModifiedItemIEs_t _rab_setup_or_modified_items_ies = { 0 }; RANAP_RAB_SetupOrModifiedItemIEs_t *rab_setup_or_modified_items_ies = &_rab_setup_or_modified_items_ies; RANAP_RAB_SetupOrModifiedItem_t *rab_setup_or_modified_item; uint16_t port; @@ -436,7 +433,7 @@ int ranap_rab_ass_req_ies_replace_inet_addr(RANAP_RAB_AssignmentRequestIEs_t *ies, struct osmo_sockaddr *addr, uint8_t rab_id) { RANAP_ProtocolIE_FieldPair_t *protocol_ie_field_pair; - RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first; + RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first = { 0 }; RANAP_RAB_SetupOrModifyItemFirst_t *rab_setup_or_modify_item_first = &_rab_setup_or_modify_item_first; RANAP_TransportLayerInformation_t *old_transport_layer_information = NULL; RANAP_TransportLayerInformation_t *new_transport_layer_information = NULL; @@ -506,7 +503,7 @@ int ranap_rab_ass_resp_ies_replace_inet_addr(RANAP_RAB_AssignmentResponseIEs_t *ies, struct osmo_sockaddr *addr, uint8_t rab_id) { RANAP_IE_t *setup_or_modified_list_ie; - RANAP_RAB_SetupOrModifiedItemIEs_t _rab_setup_or_modified_items_ies; + RANAP_RAB_SetupOrModifiedItemIEs_t _rab_setup_or_modified_items_ies = { 0 }; RANAP_RAB_SetupOrModifiedItemIEs_t *rab_setup_or_modified_items_ies = &_rab_setup_or_modified_items_ies; RANAP_RAB_SetupOrModifiedItem_t *rab_setup_or_modified_item; RANAP_TransportLayerInformation_t *temp_transport_layer_information = NULL; @@ -575,7 +572,7 @@ * \returns true when RAB could be identified as failed; false otherwise */ bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id) { - RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies; + RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies = { 0 }; RANAP_RAB_FailedItemIEs_t *rab_failed_items_ies = &_rab_failed_items_ies; int rc; @@ -596,7 +593,7 @@ * \returns true when RAB is intended for release; false otherwise */ bool ranap_rab_ass_req_ies_check_release(RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id) { - RANAP_RAB_ReleaseItemIEs_t _rab_release_items_ies; + RANAP_RAB_ReleaseItemIEs_t _rab_release_items_ies = { 0 }; RANAP_RAB_ReleaseItemIEs_t *rab_release_items_ies = &_rab_release_items_ies; int rc; bool result = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33391 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I7a8a951ccd8c9ae3923261468c0755192894a84b Gerrit-Change-Number: 33391 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-hnbgw[master]: ranap_rab_ass: do not free never allocated FieldItems
by neels 23 Jun '23

23 Jun '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33390 ) Change subject: ranap_rab_ass: do not free never allocated FieldItems ...................................................................... ranap_rab_ass: do not free never allocated FieldItems When we check for an assignment failure in a RAB AssignmnetResponse, we use decode_rab_flitms_from_resp_ies to search through the list of RAB FailedItemsIEs for the RAB id we want to check. In case of failure, we get a positive index back from this function. We then know that the RAB that we checked for has failed bcause it was in the FailedItemsList. In that case, we also must free the RAB FailedItemsIEs that decode_rab_flitms_from_resp_ies has decoded. At the moment we also free the RAB FailedItemsIEs also when decode_rab_flitms_from_resp_ies returns with a negative return code, which may mean that the RAB was not found or some other error occured. In this case we must not free since then no valid RAB FailedItemsIEs are allocated. Related: OS#6062 Change-Id: I755ba6599079810a048bf5b6d8947b5a9ffa622d --- M src/osmo-hnbgw/ranap_rab_ass.c M tests/ranap_rab_ass/ranap_rab_ass_test.c 2 files changed, 55 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c index cd8e625..e8addcd 100644 --- a/src/osmo-hnbgw/ranap_rab_ass.c +++ b/src/osmo-hnbgw/ranap_rab_ass.c @@ -176,7 +176,9 @@ return ies->raB_FailedList.raB_FailedList_ies.list.array[index]; } -/* find the RAB specified by rab_id in ies and when found, decode the result into items_ies */ +/* Find the RAB specified by rab_id in ies, decode the result into items_ies and return a positive index. + * The caller is responsible for freeing the contents in items_ies. In case of failure, the return code + * will be negative. */ static int decode_rab_smditms_from_resp_ies(RANAP_RAB_SetupOrModifiedItemIEs_t *items_ies, RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id) { @@ -576,17 +578,16 @@ RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies; RANAP_RAB_FailedItemIEs_t *rab_failed_items_ies = &_rab_failed_items_ies; int rc; - bool result = true; - /* If we can get a failed item for the specified RAB ID, then we know that the + /* If we can get a failed item (rc >= 0) for the specified RAB ID, then we know that the * HNB reported the RAB Assignment as failed */ rc = decode_rab_flitms_from_resp_ies(rab_failed_items_ies, ies, rab_id); if (rc < 0) - result = false; + return false; ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, rab_failed_items_ies); - return result; + return true; } /*! Check if a specific RAB is present in an RAB-ReleaseList inside RANAP_RAB_AssignmentRequestIEs. diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c index fc2992d..fbdfa77 100644 --- a/tests/ranap_rab_ass/ranap_rab_ass_test.c +++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c @@ -299,6 +299,31 @@ ranap_cn_rx_co_free(&message); } +/* Same as above but with a message that does not even contain a FailedItemsIEs list */ +void test_ranap_rab_ass_resp_ies_check_failure_no_faileditemies(void) +{ + int rc; + ranap_message message; + bool rab_failed_at_hnb; + uint8_t testvec[] = { + 0x60, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x01, 0x00, + 0x34, 0x40, 0x23, 0x00, 0x00, 0x01, 0x00, 0x33, + 0x40, 0x1c, 0x60, 0x3a, 0x7c, 0x35, 0x00, 0x01, + 0x0a, 0x09, 0x01, 0xa4, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x04, 0x0a, 0x00, 0x00 + }; + + rc = ranap_cn_rx_co_decode2(&message, testvec, sizeof(testvec)); + + OSMO_ASSERT(rc == 0); + rab_failed_at_hnb = + ranap_rab_ass_resp_ies_check_failure(&message.msg.raB_AssignmentResponseIEs, 23); + OSMO_ASSERT(rab_failed_at_hnb == 0) + + ranap_cn_rx_co_free(&message); +} + void test_ranap_rab_ass_req_ies_check_release(void) { int rc; @@ -413,6 +438,7 @@ test_ranap_rab_ass_req_ies_replace_inet_addr(); test_ranap_rab_ass_resp_ies_replace_inet_addr(); test_ranap_rab_ass_resp_ies_check_failure(); + test_ranap_rab_ass_resp_ies_check_failure_no_faileditemies(); test_ranap_rab_ass_req_ies_check_release(); test_ranap_rab_ass_req_ies_get_count(); -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33390 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I755ba6599079810a048bf5b6d8947b5a9ffa622d Gerrit-Change-Number: 33390 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-msc[master]: msc_a: send MNCC_RTP_CONNECT in call waiting scenarios
by neels 23 Jun '23

23 Jun '23
Attention is currently required from: falconia. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/29973 ) Change subject: msc_a: send MNCC_RTP_CONNECT in call waiting scenarios ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: i mean "a call waiting scenario" seems to say it all, but when i think about it i'm not so sure after all. like, is it A and B are in a call, then C also dials A's number, and then what, B hangs up? A hangs up? puts B on hold? ... -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/29973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ibb62cb3c154b99769b2dfe708f73c20e8b632f5d Gerrit-Change-Number: 29973 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Fri, 23 Jun 2023 13:08:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.