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

July 2023

  • 1 participants
  • 3051 discussions
[S] Change in osmo-msc[master]: msc_vty: support spaces in short/long network name
by pespin 20 Jul '23

20 Jul '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33857 ) Change subject: msc_vty: support spaces in short/long network name ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33857 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If55c92669f06f0d038e8d90088a6bd76133055a2 Gerrit-Change-Number: 33857 Gerrit-PatchSet: 2 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: Thu, 20 Jul 2023 20:59:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-gprs[master]: sm: Handle GMMSM-MODIFY.ind primitive
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33811 ) Change subject: sm: Handle GMMSM-MODIFY.ind primitive ...................................................................... sm: Handle GMMSM-MODIFY.ind primitive Change-Id: Ic765b7a565cac4abcf34d8c6868e103971d17822 --- M include/osmocom/gprs/sm/sm_private.h M src/sm/sm.c M src/sm/sm_prim.c 3 files changed, 154 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/sm/sm_private.h b/include/osmocom/gprs/sm/sm_private.h index 98eaf79..b1b3bc2 100644 --- a/include/osmocom/gprs/sm/sm_private.h +++ b/include/osmocom/gprs/sm/sm_private.h @@ -156,6 +156,7 @@ struct osmo_gprs_sm_prim *gprs_sm_prim_alloc_smreg_pdp_act_cnf(void); struct osmo_gprs_sm_prim *gprs_sm_prim_alloc_smreg_pdp_act_ind(void); +struct osmo_gprs_sm_prim *gprs_sm_prim_alloc_smreg_pdp_deact_ind(void); /* sm.c: */ struct gprs_sm_ms *gprs_sm_ms_alloc(uint32_t ms_id); @@ -167,9 +168,13 @@ void gprs_sm_entity_free(struct gprs_sm_entity *sme); struct gprs_sm_entity *gprs_sm_find_sme_by_sess_id(uint32_t sess_id); +void gprs_sm_handle_ie_pdp_ctx_status(struct gprs_sm_ms *ms, const uint8_t *pdp_status); + int gprs_sm_submit_gmmsm_assign_req(const struct gprs_sm_entity *sme); int gprs_sm_submit_smreg_pdp_act_cnf(const struct gprs_sm_entity *sme, enum gsm48_gsm_cause cause); +int gprs_sm_submit_smreg_pdp_deact_ind(const struct gprs_sm_entity *sme, enum gsm48_gsm_cause cause); int gprs_sm_submit_snsm_act_ind(const struct gprs_sm_entity *sme); +int gprs_sm_submit_snsm_deact_ind(const struct gprs_sm_entity *sme); int gprs_sm_tx_act_pdp_ctx_req(struct gprs_sm_entity *sme); int gprs_sm_rx(struct gprs_sm_entity *sme, struct gsm48_hdr *gh, unsigned int len); diff --git a/src/sm/sm.c b/src/sm/sm.c index 79fbc7d..308117f 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -236,6 +236,24 @@ return rc; } +int gprs_sm_submit_smreg_pdp_deact_ind(const struct gprs_sm_entity *sme, enum gsm48_gsm_cause cause) +{ + struct osmo_gprs_sm_prim *sm_prim_tx; + int rc; + + sm_prim_tx = gprs_sm_prim_alloc_smreg_pdp_deact_ind(); + sm_prim_tx->smreg.ms_id = sme->ms->ms_id; + sm_prim_tx->smreg.pdp_deact_ind.nsapi[0] = sme->nsapi; + sm_prim_tx->smreg.pdp_deact_ind.num_nsapi = 1; + sm_prim_tx->smreg.pdp_deact_ind.tear_down_ind = 0; + sm_prim_tx->smreg.pdp_deact_ind.cause = cause; + sm_prim_tx->smreg.pdp_deact_ind.pco_len = sme->pco_len; + if (sme->pco_len) + memcpy(sm_prim_tx->smreg.pdp_deact_cnf.pco, &sme->pco, sme->pco_len); + + rc = gprs_sm_prim_call_up_cb(sm_prim_tx); + return rc; +} int gprs_sm_submit_snsm_act_ind(const struct gprs_sm_entity *sme) { @@ -253,6 +271,18 @@ return rc; } +int gprs_sm_submit_snsm_deact_ind(const struct gprs_sm_entity *sme) +{ + struct osmo_gprs_sndcp_prim *sndcp_prim_tx; + int rc; + + sndcp_prim_tx = osmo_gprs_sndcp_prim_alloc_snsm_deactivate_ind( + sme->ms->gmm.tlli, sme->nsapi); + + rc = gprs_sm_prim_call_sndcp_up_cb(sndcp_prim_tx); + return rc; +} + /* Tx SM Activate PDP context request, 9.5.1 */ int gprs_sm_tx_act_pdp_ctx_req(struct gprs_sm_entity *sme) { @@ -431,3 +461,32 @@ return rc; } + +void gprs_sm_handle_ie_pdp_ctx_status(struct gprs_sm_ms *ms, const uint8_t *pdp_status) +{ + unsigned int i; + /* 24.008 4.7.5.1.3: If the PDP context status information element is + * included in ROUTING AREA UPDATE REQUEST message, then the network + * shall deactivate all those PDP contexts locally (without peer to + * peer signalling between the MS and the network), which are not in SM + * state PDP-INACTIVE on network side but are indicated by the MS as + * being in state PDP-INACTIVE. */ + + for (i = 0; i < ARRAY_SIZE(ms->pdp); i++) { + struct gprs_sm_entity *sme = ms->pdp[i]; + bool inactive; + if (!sme) + continue; + + inactive = (sme->nsapi < 8) ? + !(pdp_status[0] & (1 << sme->nsapi)) : + !(pdp_status[1] & (1 << (sme->nsapi - 8))); + if (!inactive) + continue; + LOGSME(sme, LOGL_NOTICE, + "PDP context status informs PDP context is PDP-INACTIVE, deleting\n"); + gprs_sm_submit_snsm_deact_ind(sme); + /* See TS 24.007 Appendix C.10: Wait for SNSM-DEACTIVATE.rsp, + * then submit SMREG-DEACTIVATE.ind and free the object */ + } +} diff --git a/src/sm/sm_prim.c b/src/sm/sm_prim.c index b513aa7..66df8c2 100644 --- a/src/sm/sm_prim.c +++ b/src/sm/sm_prim.c @@ -187,6 +187,14 @@ return sm_prim; } +/* TS 24.007 6.5.1.7 SMREG-PDP-ACTIVATE-IND */ +struct osmo_gprs_sm_prim *gprs_sm_prim_alloc_smreg_pdp_deact_ind(void) +{ + struct osmo_gprs_sm_prim *sm_prim; + sm_prim = sm_prim_smreg_alloc(OSMO_GPRS_SM_SMREG_PDP_DEACTIVATE, PRIM_OP_INDICATION, 0); + return sm_prim; +} + static int gprs_sm_prim_handle_unsupported(struct osmo_gprs_sm_prim *sm_prim) { LOGSM(LOGL_ERROR, "Unsupported sm_prim! %s\n", osmo_gprs_sm_prim_name(sm_prim)); @@ -339,7 +347,7 @@ return rc; } -/* TS 24.007 6.6.1.1 SMREG-Attach.request:*/ +/* TS 24.007 5.1.2.20 SNSM-ACTIVATE.response: */ static int gprs_sm_prim_handle_snsm_act_resp(struct osmo_gprs_sndcp_prim *sndcp_prim) { int rc; @@ -365,6 +373,37 @@ return rc; } +/* TS 24.007 5.1.2.22 SNSM-DEACTIVATE.response: */ +static int gprs_sm_prim_handle_snsm_deact_resp(struct osmo_gprs_sndcp_prim *sndcp_prim) +{ + int rc; + struct gprs_sm_ms *ms; + struct gprs_sm_entity *sme; + + ms = gprs_sm_find_ms_by_tlli(sndcp_prim->snsm.tlli); + if (!ms) { + LOGSM(LOGL_ERROR, "Rx %s: Unable to find MS with TLLI=0x%08x\n", + osmo_gprs_sndcp_prim_name(sndcp_prim), sndcp_prim->snsm.tlli); + return -ENOENT; + } + + sme = gprs_sm_ms_get_pdp_ctx(ms, sndcp_prim->snsm.activate_rsp.nsapi); + if (!sme) { + LOGMS(ms, LOGL_ERROR, "Rx %s: Unable to find NSAPI=%u\n", + osmo_gprs_sndcp_prim_name(sndcp_prim), + sndcp_prim->snsm.activate_rsp.nsapi); + return -ENOENT; + } + + rc = gprs_sm_submit_smreg_pdp_deact_ind(sme, GSM_CAUSE_REACT_RQD); + + /* Submitting GMM_RELEASE.ind received the GMM release was delayed until + * getting SNSM-DEACT.ind->rsp pingpong, since it would free the sme. Do it now: + */ + rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_GMM_RELEASE_IND, NULL); + return rc; +} + /* SNDCP higher layers push SNDCP primitive (SNSM) down to SM layer: */ static int gprs_sm_prim_handle_sndcp_snsm(struct osmo_gprs_sndcp_prim *sndcp_prim) { @@ -375,6 +414,8 @@ rc = gprs_sm_prim_handle_snsm_act_resp(sndcp_prim); break; case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_DEACTIVATE, PRIM_OP_RESPONSE): + rc = gprs_sm_prim_handle_snsm_deact_resp(sndcp_prim); + break; case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_MODIFY, PRIM_OP_RESPONSE): case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_STATUS, PRIM_OP_REQUEST): case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_SEQUENCE, PRIM_OP_RESPONSE): @@ -530,6 +571,42 @@ return rc; } +/* Osmocom specific, GMMSM-MODIFY-IND */ +static int gprs_sm_prim_handle_gmmsm_modify_ind(struct osmo_gprs_gmm_prim *gmm_prim) +{ + struct osmo_gprs_gmm_gmmsm_prim *gmmsm = &gmm_prim->gmmsm; + struct gprs_sm_entity *sme; + struct gprs_sm_ms *ms; + int rc = 0; + + sme = gprs_sm_find_sme_by_sess_id(gmmsm->sess_id); + if (!sme) { + LOGSM(LOGL_ERROR, "Rx GMMSM-MODIFY.ind for non existing SM Entity\n"); + return -EINVAL; + } + + ms = sme->ms; + + /* Update allocated PTMSI: */ + if (gmm_prim->gmmsm.modify_ind.allocated_ptmsi != GSM_RESERVED_TMSI) + ms->gmm.ptmsi = gmm_prim->gmmsm.modify_ind.allocated_ptmsi; + ms->gmm.ptmsi_sig = gmm_prim->gmmsm.modify_ind.allocated_ptmsi_sig; + /* Update allocated TLLI: */ + ms->gmm.tlli = gmm_prim->gmmsm.modify_ind.allocated_tlli; + /* Update the current RAI: */ + memcpy(&ms->gmm.ra, &gmm_prim->gmmsm.modify_ind.rai, sizeof(ms->gmm.ra)); + + if (gmm_prim->gmmsm.modify_ind.pdp_ctx_status_present) + gprs_sm_handle_ie_pdp_ctx_status(ms, gmm_prim->gmmsm.modify_ind.pdp_ctx_status); + /* Note: sme may be freed here, it needs to be looked up again: + * sme = gprs_sm_find_sme_by_sess_id(gmmsm->sess_id); + */ + + /* TODO: Handle gmm_prim->gmmsm.modify_ind.rx_npdu_numbers_list + * Submit SNSM-SEQUENCE-IND, see TS 24.007 "C.16(cont’d) Routing Area Update, Inter SGSN" */ + return rc; +} + static int gprs_sm_prim_handle_gmmsm(struct osmo_gprs_gmm_prim *gmm_prim) { int rc = 0; @@ -543,6 +620,9 @@ case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_UNITDATA, PRIM_OP_INDICATION): rc = gprs_sm_prim_handle_gmmsm_unitdata_ind(gmm_prim); break; + case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_MODIFY, PRIM_OP_INDICATION): + rc = gprs_sm_prim_handle_gmmsm_modify_ind(gmm_prim); + break; default: rc = gprs_sm_prim_handle_gmm_unsupported(gmm_prim); rc = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ic765b7a565cac4abcf34d8c6868e103971d17822 Gerrit-Change-Number: 33811 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sndcp: Answer SNSM-DEACTIVATE.ind with .resp
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33839 ) Change subject: sndcp: Answer SNSM-DEACTIVATE.ind with .resp ...................................................................... sndcp: Answer SNSM-DEACTIVATE.ind with .resp Change-Id: I8ddebf93d3150cc952f9e5fc5d6f3cfc99e912a5 --- M include/osmocom/gprs/sndcp/sndcp_private.h M src/sndcp/sndcp_prim.c M tests/sndcp/sndcp_prim_test.c M tests/sndcp/sndcp_prim_test.ok 4 files changed, 31 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/sndcp/sndcp_private.h b/include/osmocom/gprs/sndcp/sndcp_private.h index dcbde67..43ea7ca 100644 --- a/include/osmocom/gprs/sndcp/sndcp_private.h +++ b/include/osmocom/gprs/sndcp/sndcp_private.h @@ -203,6 +203,7 @@ struct osmo_gprs_sndcp_prim *gprs_sndcp_prim_alloc_sn_xid_ind(uint32_t tlli, uint8_t sapi, uint8_t nsapi); struct osmo_gprs_sndcp_prim *gprs_sndcp_prim_alloc_sn_xid_cnf(uint32_t tlli, uint8_t sapi, uint8_t nsapi); struct osmo_gprs_sndcp_prim *gprs_sndcp_prim_alloc_snsm_activate_rsp(uint32_t tlli, uint8_t nsapi); +struct osmo_gprs_sndcp_prim *gprs_sndcp_prim_alloc_snsm_deactivate_rsp(uint32_t tlli, uint8_t nsapi); int gprs_sndcp_prim_call_up_cb(struct osmo_gprs_sndcp_prim *sndcp_prim); int gprs_sndcp_prim_call_down_cb(struct osmo_gprs_llc_prim *llc_prim); int gprs_sndcp_prim_call_snsm_cb(struct osmo_gprs_sndcp_prim *sndcp_prim); diff --git a/src/sndcp/sndcp_prim.c b/src/sndcp/sndcp_prim.c index 3c4ced3..b234d3c 100644 --- a/src/sndcp/sndcp_prim.c +++ b/src/sndcp/sndcp_prim.c @@ -279,6 +279,16 @@ return sndcp_prim; } +/* 5.1.2.22 SNSM-DEACTIVATE.response */ +struct osmo_gprs_sndcp_prim *gprs_sndcp_prim_alloc_snsm_deactivate_rsp(uint32_t tlli, uint8_t nsapi) +{ + struct osmo_gprs_sndcp_prim *sndcp_prim; + sndcp_prim = sndcp_prim_snsm_alloc(OSMO_GPRS_SNDCP_SNSM_DEACTIVATE, PRIM_OP_RESPONSE, 0); + sndcp_prim->snsm.tlli = tlli; + sndcp_prim->snsm.deactivate_rsp.nsapi = nsapi; + return sndcp_prim; +} + static int gprs_sndcp_prim_handle_unsupported(struct osmo_gprs_sndcp_prim *sndcp_prim) { LOGSNDCP(LOGL_ERROR, "Unsupported sndcp_prim! %s\n", osmo_gprs_sndcp_prim_name(sndcp_prim)); @@ -656,6 +666,7 @@ struct gprs_sndcp_entity *sne; uint32_t tlli = sndcp_prim->snsm.tlli; uint8_t nsapi = sndcp_prim->snsm.deactivate_ind.nsapi; + struct osmo_gprs_sndcp_prim *sndcp_prim_tx; snme = gprs_sndcp_snme_find_by_tlli(tlli); if (!snme) { @@ -672,6 +683,11 @@ } gprs_sndcp_sne_free(sne); + + /* TS 24.007 Appendix C.10 Submit SNSM-DEACTIVATE.rsp: */ + sndcp_prim_tx = gprs_sndcp_prim_alloc_snsm_deactivate_rsp(tlli, nsapi); + OSMO_ASSERT(sndcp_prim_tx); + rc = gprs_sndcp_prim_call_snsm_cb(sndcp_prim_tx); return rc; } diff --git a/tests/sndcp/sndcp_prim_test.c b/tests/sndcp/sndcp_prim_test.c index cf29ec0..9dd1b5e 100644 --- a/tests/sndcp/sndcp_prim_test.c +++ b/tests/sndcp/sndcp_prim_test.c @@ -97,6 +97,9 @@ case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_ACTIVATE, PRIM_OP_RESPONSE): printf("%s(): Rx %s\n", __func__, npdu_name); break; + case OSMO_PRIM(OSMO_GPRS_SNDCP_SNSM_DEACTIVATE, PRIM_OP_RESPONSE): + printf("%s(): Rx %s\n", __func__, npdu_name); + break; default: printf("%s(): Unexpected Rx %s\n", __func__, npdu_name); OSMO_ASSERT(0); diff --git a/tests/sndcp/sndcp_prim_test.ok b/tests/sndcp/sndcp_prim_test.ok index 9476e44..3b9bb0b 100644 --- a/tests/sndcp/sndcp_prim_test.ok +++ b/tests/sndcp/sndcp_prim_test.ok @@ -3,6 +3,7 @@ test_sndcp_prim_down_cb(): Rx LL-XID.response test_sndcp_prim_up_cb(): Rx SN-UNITDATA.indication TLLI=0xe1c5d364 SAPI=SNDCP3 NSAPI=5 NPDU=[75 22 fa 7c ff d9 56 ba 86 c7 2a f3 d2 1d ce bc 88 3a 8e b6 24 7d de 26 6a 58 de 29 be 96 d2 40 94 7f 9f 4d f5 9c 61 d4 19 e9 9a 58 75 21 21 a9 fd 1f d7 96 90 a7 3f fe 5b 59 f0 e7 c1 52 2c aa a1 39 b6 c5 fd 68 2e fc f4 c0 10 9b 7a 64 9d ae 3a ff a3 0f b0 56 7d 4b 52 33 74 13 67 44 6a ce 62 45 ea cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] test_sndcp_prim_down_cb(): Rx LL-UNITDATA.request TLLI=0xe1c5d364 SAPI=SNDCP3 L3=[65 00 00 00 73 6f 6d 65 2d 6e 70 64 75 2d 64 61 74 61 2d 6c 69 6b 65 2d 61 6e 2d 69 70 2d 70 6b 74 00 ] +test_sndcp_prim_snsm_cb(): Rx SNSM-DEACTIVATE.response ==== test_sndcp_prim_net() [end] ==== ==== test_sndcp_prim_ms() [start] ==== test_sndcp_prim_snsm_cb(): Rx SNSM-ACTIVATE.response @@ -10,4 +11,5 @@ test_sndcp_prim_up_cb(): Rx SN-XID.confirm test_sndcp_prim_up_cb(): Rx SN-UNITDATA.indication TLLI=0xe1c5d364 SAPI=SNDCP3 NSAPI=5 NPDU=[75 22 fa 7c ff d9 56 ba 86 c7 2a f3 d2 1d ce bc 88 3a 8e b6 24 7d de 26 6a 58 de 29 be 96 d2 40 94 7f 9f 4d f5 9c 61 d4 19 e9 9a 58 75 21 21 a9 fd 1f d7 96 90 a7 3f fe 5b 59 f0 e7 c1 52 2c aa a1 39 b6 c5 fd 68 2e fc f4 c0 10 9b 7a 64 9d ae 3a ff a3 0f b0 56 7d 4b 52 33 74 13 67 44 6a ce 62 45 ea cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ] test_sndcp_prim_down_cb(): Rx LL-UNITDATA.request TLLI=0xe1c5d364 SAPI=SNDCP3 L3=[65 00 00 00 73 6f 6d 65 2d 6e 70 64 75 2d 64 61 74 61 2d 6c 69 6b 65 2d 61 6e 2d 69 70 2d 70 6b 74 00 ] +test_sndcp_prim_snsm_cb(): Rx SNSM-DEACTIVATE.response ==== test_sndcp_prim_ms() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8ddebf93d3150cc952f9e5fc5d6f3cfc99e912a5 Gerrit-Change-Number: 33839 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: llc: Introduce LL-ASSIGN.ind
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33840 ) Change subject: llc: Introduce LL-ASSIGN.ind ...................................................................... llc: Introduce LL-ASSIGN.ind TS 24.007, TS 24.008, TS 44.064 nor TS 44.065 explain how the TLLI update happening during GMM RAU propagates to the SNDCP layer. GMM only has interfaces towards LLC and GRR, and uses LLGMM-Assign.Req and GMMRR-Assign.req to update the TLLI in the respective layers. This patch adds a new primitive in the LL interface (LLC->SNDCP) LL-Assign.ind to propagate the LLGM-Assign.req received from GMM towards SNDCP, so that it can use the new TLLI in order to address the specific MS. Change-Id: Icb858f5397414b6d4183c21f13d35c0166ca7635 --- M include/osmocom/gprs/llc/llc_prim.h M include/osmocom/gprs/llc/llc_private.h M src/llc/llc_ll.c M src/llc/llc_llgmm.c M tests/llc/llc_prim_test.c 5 files changed, 61 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index c03f396..adcd22f 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -56,6 +56,7 @@ OSMO_GPRS_LLC_LL_DATA, /* Req/Ind/Cnf: TLLI, L3-PDU, Ref, QoS, Radio Prio */ OSMO_GPRS_LLC_LL_UNITDATA, /* Req/Ind: TLLI, L3-PDU, QoS, Radio Prio, Ciph, ... */ OSMO_GPRS_LLC_LL_STATUS, /* Ind: TLLI, Cause */ + OSMO_GPRS_LLC_LL_ASSIGN, /* Ind: TLLI old, TLLI new; Osmocom specific */ }; extern const struct value_string osmo_gprs_llc_ll_prim_type_names[]; @@ -214,6 +215,10 @@ struct { uint8_t cause; } status_ind; + /* OSMO_GPRS_LLC_LL_ASSIGN | Ind */ + struct { + uint32_t tlli_new; + } assign_ind; }; }; diff --git a/include/osmocom/gprs/llc/llc_private.h b/include/osmocom/gprs/llc/llc_private.h index 78e6e9f..44d32e2 100644 --- a/include/osmocom/gprs/llc/llc_private.h +++ b/include/osmocom/gprs/llc/llc_private.h @@ -297,6 +297,7 @@ uint8_t *l3_par, unsigned int l3_par_len); struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_ll_xid_cnf(uint32_t tlli, enum osmo_gprs_llc_sapi ll_sapi, uint8_t *l3_par, unsigned int l3_par_len); +struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_ll_assign_ind(uint32_t old_tlli, uint32_t new_tlli); struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_ll_unitdata_ind( uint32_t tlli, enum osmo_gprs_llc_sapi ll_sapi, uint8_t *l3_pdu, size_t l3_pdu_len); @@ -305,7 +306,7 @@ int gprs_llc_lle_submit_prim_ll_xid_cnf(struct gprs_llc_lle *lle, const struct gprs_llc_xid_field *xid_field_response_l3, const struct gprs_llc_xid_field *xid_field_request_l3); - +int gprs_llc_llme_submit_prim_ll_assign_ind(uint32_t old_tlli, uint32_t new_tlli); /* llc_llgmm.c */ int gprs_llc_prim_llgmm_upper_down(struct osmo_gprs_llc_prim *llc_prim); diff --git a/src/llc/llc_ll.c b/src/llc/llc_ll.c index a13a7f5..b907299 100644 --- a/src/llc/llc_ll.c +++ b/src/llc/llc_ll.c @@ -40,6 +40,7 @@ { OSMO_GPRS_LLC_LL_DATA, "DATA" }, { OSMO_GPRS_LLC_LL_UNITDATA, "UNITDATA" }, { OSMO_GPRS_LLC_LL_STATUS, "STATUS" }, + { OSMO_GPRS_LLC_LL_ASSIGN, "ASSIGN" }, { 0, NULL } }; @@ -152,6 +153,17 @@ return llc_prim; } +/* LL-ASSIGN.ind (MS/SGSN): Osmocom specific, used to inform TLLI update LLC->SNDCP */ +struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_ll_assign_ind(uint32_t old_tlli, uint32_t new_tlli) +{ + struct osmo_gprs_llc_prim *llc_prim; + llc_prim = llc_prim_ll_alloc(OSMO_GPRS_LLC_LL_ASSIGN, PRIM_OP_INDICATION, 0); + llc_prim->ll.tlli = old_tlli; + llc_prim->ll.sapi = OSMO_GPRS_LLC_SAPI_SNDCP3; /* any SNDCP SAPI is good */ + llc_prim->ll.assign_ind.tlli_new = new_tlli; + return llc_prim; +} + /******************************** * Handling to upper layers: ********************************/ @@ -192,6 +204,16 @@ return gprs_llc_prim_call_up_cb(llc_prim_tx); } + +int gprs_llc_llme_submit_prim_ll_assign_ind(uint32_t old_tlli, uint32_t new_tlli) +{ + struct osmo_gprs_llc_prim *llc_prim_tx; + llc_prim_tx = gprs_llc_prim_alloc_ll_assign_ind(old_tlli, new_tlli); + OSMO_ASSERT(llc_prim_tx); + + return gprs_llc_prim_call_up_cb(llc_prim_tx); +} + /******************************** * Handling from upper layers: ********************************/ diff --git a/src/llc/llc_llgmm.c b/src/llc/llc_llgmm.c index d85a30e..f33d6de 100644 --- a/src/llc/llc_llgmm.c +++ b/src/llc/llc_llgmm.c @@ -207,6 +207,9 @@ llme->old_tlli = old_tlli; llme->tlli = new_tlli; llme->state = OSMO_GPRS_LLC_LLMS_ASSIGNED; + /* Inform SNDCP about the TLLI change so it can update it too: */ + if (old_tlli != new_tlli) + gprs_llc_llme_submit_prim_ll_assign_ind(old_tlli, new_tlli); } else if (old_tlli != TLLI_UNASSIGNED && new_tlli == TLLI_UNASSIGNED) { /* TLLI Unassignment 8.3.3) */ llme->tlli = llme->old_tlli = 0; diff --git a/tests/llc/llc_prim_test.c b/tests/llc/llc_prim_test.c index bcba783..b9e2e0e 100644 --- a/tests/llc/llc_prim_test.c +++ b/tests/llc/llc_prim_test.c @@ -48,9 +48,17 @@ printf("%s(): Rx %s TLLI=0x%08x\n", __func__, pdu_name, llc_prim->llgmm.tlli); break; case OSMO_GPRS_LLC_SAP_LL: - printf("%s(): Rx %s TLLI=0x%08x SAPI=%s l3=[%s]\n", __func__, pdu_name, - llc_prim->ll.tlli, osmo_gprs_llc_sapi_name(llc_prim->ll.sapi), - osmo_hexdump(llc_prim->ll.l3_pdu, llc_prim->ll.l3_pdu_len)); + switch (OSMO_PRIM_HDR(&llc_prim->oph)) { + case OSMO_PRIM(OSMO_GPRS_LLC_LL_ASSIGN, PRIM_OP_INDICATION): + printf("%s(): Rx %s TLLI=0x%08x NEW_TLLI=x%08x\n", __func__, pdu_name, + llc_prim->ll.tlli, llc_prim->ll.assign_ind.tlli_new); + break; + default: + printf("%s(): Rx %s TLLI=0x%08x SAPI=%s l3=[%s]\n", __func__, pdu_name, + llc_prim->ll.tlli, osmo_gprs_llc_sapi_name(llc_prim->ll.sapi), + osmo_hexdump(llc_prim->ll.l3_pdu, llc_prim->ll.l3_pdu_len)); + break; + } break; default: printf("%s(): Unexpected Rx %s\n", __func__, pdu_name); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Icb858f5397414b6d4183c21f13d35c0166ca7635 Gerrit-Change-Number: 33840 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: gmm: Introduce GMMSM-Modify.ind primitive
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33810 ) Change subject: gmm: Introduce GMMSM-Modify.ind primitive ...................................................................... gmm: Introduce GMMSM-Modify.ind primitive TS 24.007 and TS 24.008 seem to lack providing an explicit way to pass information between GMM and SM (GMMSM interface) when a RAU process happens in GMM (rx RAU Accept). This lack of primitive can easily be spotted by looking at TS 24.007 Appending C.15, or even better, at the 3rd page of "C.16(cont’d)" around the "STOP Trams" timer, where the info is magically available in SM when being received at GMM. Change-Id: I81e207d44d88f18f0ee13fb413827606a6f830bc --- M include/osmocom/gprs/gmm/gmm_prim.h M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_prim.c M tests/gmm/gmm_prim_test.c M tests/gmm/gmm_prim_test.err M tests/gmm/gmm_prim_test.ok 7 files changed, 144 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/gmm/gmm_prim.h b/include/osmocom/gprs/gmm/gmm_prim.h index b774ef8..e066a15 100644 --- a/include/osmocom/gprs/gmm/gmm_prim.h +++ b/include/osmocom/gprs/gmm/gmm_prim.h @@ -203,6 +203,7 @@ OSMO_GPRS_GMM_GMMSM_ESTABLISH, /* Req, Cnf/Rej */ OSMO_GPRS_GMM_GMMSM_RELEASE, /* Ind */ OSMO_GPRS_GMM_GMMSM_UNITDATA, /* Req, Ind */ + OSMO_GPRS_GMM_GMMSM_MODIFY, /* Ind, osmocom extension */ }; extern const struct value_string osmo_gprs_gmm_gmmsm_prim_type_names[]; static inline const char *osmo_gprs_gmm_gmmsm_prim_type_name(enum osmo_gprs_gmm_gmmsm_prim_type val) @@ -257,6 +258,19 @@ uint8_t *smpdu; uint16_t smpdu_len; } unitdata_ind; + /* OSMO_GPRS_GMM_GMMSM_MODIFY | Ind */ + struct { + /* PLMNs MT-caps, attach-type. */ + uint32_t allocated_ptmsi; + uint32_t allocated_ptmsi_sig; + uint32_t allocated_tlli; + struct gprs_ra_id rai; + bool pdp_ctx_status_present; + uint8_t pdp_ctx_status[2]; /* bitmask TS 24.008 10.5.7.1 */ + bool rx_npdu_numbers_list_present; + uint8_t rx_npdu_numbers_list[17]; /* TS 24.008 10.5.5.11 */ + uint8_t rx_npdu_numbers_list_len; /* bitmask TS 24.008 10.5.5.11 */ + } modify_ind; }; }; diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index 46795c8..2abd583 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -66,6 +66,7 @@ uint8_t radio_prio; /* TS 24.008 10.5.7.2 */ struct gprs_ra_id ra; /* TS 24.008 10.5.5.15 (decoded) */ + bool pdp_ctx_status_present; uint8_t pdp_ctx_status[2]; /* TS 24.008 10.5.7.1 */ bool rx_npdu_numbers_list_present; uint8_t rx_npdu_numbers_list[17]; /* TS 24.008 10.5.5.11 */ @@ -111,7 +112,7 @@ struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_establish_cnf(uint32_t id, uint8_t cause); struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_release_ind(uint32_t id); struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_unitdata_ind(uint32_t id, uint8_t *smpdu, unsigned int smpdu_len); - +struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_modify_ind(uint32_t id); /* gmm.c: */ struct gprs_gmm_entity *gprs_gmm_gmme_alloc(uint32_t ptmsi, const char *imsi); void gprs_gmm_gmme_free(struct gprs_gmm_entity *gmme); @@ -142,6 +143,7 @@ int gprs_gmm_submit_gmmreg_attach_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); int gprs_gmm_submit_gmmsm_release_ind(struct gprs_gmm_entity *gmme); +int gprs_gmm_submit_gmmsm_modify_ind(struct gprs_gmm_entity *gmme); int gprs_gmm_submit_llgmm_assing_req(const struct gprs_gmm_entity *gmme); /* misc.c */ diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 6eaf461..e3afc18 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -498,6 +498,30 @@ return rc; } +/* Osmocom specific, see missing primitive in TS 24.007 Annex C.16 around "STOP + * Trams". It is used to propagate TLLI update to SM (and then to SNDCP). */ +int gprs_gmm_submit_gmmsm_modify_ind(struct gprs_gmm_entity *gmme) +{ + struct osmo_gprs_gmm_prim *gmm_prim; + int rc; + + gmm_prim = gprs_gmm_prim_alloc_gmmsm_modify_ind(gmme->sess_id); + gmm_prim->gmmsm.modify_ind.allocated_ptmsi = gmme->ptmsi; + gmm_prim->gmmsm.modify_ind.allocated_ptmsi_sig = gmme->ptmsi_sig; + gmm_prim->gmmsm.modify_ind.allocated_tlli = gmme->tlli; + memcpy(&gmm_prim->gmmsm.modify_ind.rai, &gmme->ra, sizeof(gmme->ra)); + gmm_prim->gmmsm.modify_ind.pdp_ctx_status_present = gmme->pdp_ctx_status_present; + if (gmm_prim->gmmsm.modify_ind.pdp_ctx_status_present) + memcpy(&gmm_prim->gmmsm.modify_ind.pdp_ctx_status, &gmme->pdp_ctx_status, sizeof(gmme->pdp_ctx_status)); + gmm_prim->gmmsm.modify_ind.rx_npdu_numbers_list_present = gmme->rx_npdu_numbers_list_present; + gmm_prim->gmmsm.modify_ind.rx_npdu_numbers_list_len = gmme->rx_npdu_numbers_list_len; + if (gmme->rx_npdu_numbers_list_len > 0) + memcpy(&gmm_prim->gmmsm.modify_ind.rx_npdu_numbers_list, &gmme->rx_npdu_numbers_list, gmme->rx_npdu_numbers_list_len); + + rc = gprs_gmm_prim_call_up_cb(gmm_prim); + return rc; +} + static int gprs_gmm_submit_gmmrr_assing_req(struct gprs_gmm_entity *gmme) { struct osmo_gprs_gmm_prim *gmm_prim_tx; @@ -1121,22 +1145,32 @@ /* 10.5.1.13 Equivalent PLMNs: TODO */ /* 10.5.7.1 PDP context status: TODO */ - if (TLVP_PRES_LEN(&tp, GSM48_IE_GMM_PDP_CTX_STATUS, 2)) + if (TLVP_PRES_LEN(&tp, GSM48_IE_GMM_PDP_CTX_STATUS, 2)) { memcpy(gmme->pdp_ctx_status, TLVP_VAL(&tp, GSM48_IE_GMM_PDP_CTX_STATUS), 2); - + gmme->pdp_ctx_status_present = true; + } else { + gmme->pdp_ctx_status_present = false; + } /* TODO: lots more Optional IEs */ } - /* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.1 */ + /* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.15 */ rc = gprs_gmm_submit_llgmm_assing_req(gmme); if (rc < 0) goto rejected; - /* Submit GMMRR-ASSIGN-REQ as per TS 24.007 Annex C.1 */ + /* Submit GMMRR-ASSIGN-REQ as per TS 24.007 Annex C.15 */ rc = gprs_gmm_submit_gmmrr_assing_req(gmme); if (rc < 0) goto rejected; + /* Submit GMMSM-MODIFY-REQ, see missing primitive in TS 24.007 Annex C.16 around "STOP Trams" */ + if (gmme->sess_id != GPRS_GMM_SESS_ID_UNASSIGNED) { + rc = gprs_gmm_submit_gmmsm_modify_ind(gmme); + if (rc < 0) + goto rejected; + } + rc = gprs_gmm_tx_rau_compl(gmme); if (rc < 0) goto rejected; diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index 5a35ef2..3beaea8 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -64,6 +64,7 @@ { OSMO_GPRS_GMM_GMMSM_ESTABLISH, "ESTABLISH" }, { OSMO_GPRS_GMM_GMMSM_RELEASE, "RELEASE" }, { OSMO_GPRS_GMM_GMMSM_UNITDATA, "UNITDATA" }, + { OSMO_GPRS_GMM_GMMSM_MODIFY, "MODIFY" }, { 0, NULL } }; @@ -318,6 +319,16 @@ return gmm_prim; } +/* Osmocom specific, see missing primitive in TS 24.007 Annex C.16 around "STOP + * Trams". It is used to propagate TLLI update to SM (and then to SNDCP). */ +struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_modify_ind(uint32_t id) +{ + struct osmo_gprs_gmm_prim *gmm_prim; + gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_MODIFY, PRIM_OP_INDICATION, 0); + gmm_prim->gmmsm.sess_id = id; + return gmm_prim; +} + /* 3GPP TS 24.007 9.5.1.5 GMMSM-UNITDATA-REQ:*/ struct osmo_gprs_gmm_prim *osmo_gprs_gmm_prim_alloc_gmmsm_unitdata_req(uint32_t id, uint8_t *smpdu, unsigned int smpdu_len) { diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index 2297518..c33bddc 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -237,10 +237,11 @@ switch (OSMO_PRIM_HDR(&gmm_prim->oph)) { case OSMO_PRIM(OSMO_GPRS_GMM_GMMREG_ATTACH, PRIM_OP_CONFIRM): if (gmm_prim->gmmreg.attach_cnf.accepted) { - printf("%s(): Rx %s accepted=%u allocated_ptmsi=0x%08x allocated_ptmsi_sig=0x%06x\n", __func__, pdu_name, + printf("%s(): Rx %s accepted=%u allocated_ptmsi=0x%08x allocated_ptmsi_sig=0x%06x allocated_tlli=0x%08x\n", __func__, pdu_name, gmm_prim->gmmreg.attach_cnf.accepted, gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi, - gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi_sig); + gmm_prim->gmmreg.attach_cnf.acc.allocated_ptmsi_sig, + gmm_prim->gmmreg.attach_cnf.acc.allocated_tlli); } else { printf("%s(): Rx %s accepted=%u rej_cause=%u\n", __func__, pdu_name, gmm_prim->gmmreg.attach_cnf.accepted, @@ -298,6 +299,13 @@ printf("%s(): Rx %s sess_id=%u\n", __func__, pdu_name, gmm_prim->gmmsm.sess_id); break; + case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_MODIFY, PRIM_OP_INDICATION): + printf("%s(): Rx %s sess_id=%u allocated_ptmsi=0x%08x allocated_ptmsi_sig=0x%06x allocated_tlli=0x%08x\n", __func__, pdu_name, + gmm_prim->gmmsm.sess_id, + gmm_prim->gmmsm.modify_ind.allocated_ptmsi, + gmm_prim->gmmsm.modify_ind.allocated_ptmsi_sig, + gmm_prim->gmmsm.modify_ind.allocated_tlli); + break; default: printf("%s(): Unexpected Rx %s\n", __func__, pdu_name); OSMO_ASSERT(0) @@ -510,6 +518,7 @@ uint32_t ptmsi = 0x00001234; uint32_t ptmsi_sig = 0x556677; uint32_t rand_tlli = 0x80001234; + uint32_t tlli; char *imsi = "1234567890"; char *imei = "42342342342342"; char *imeisv = "4234234234234275"; @@ -576,6 +585,27 @@ OSMO_ASSERT(rc == 0); /* As a result, GMM submits GMMSM-UNITDATA.ind */ + /* Wait for READY timer to expire: */ + clock_override_add(44, 0); /* 44: See GMM Attach Accept (pdu_gmm_att_acc) fed above */ + clock_debug("Expect T3314 (READY) timeout"); + osmo_select_main(0); + + clock_override_add(10*60, 0); /* 10*60: See GMM Attach Accept (pdu_gmm_att_acc) fed above */ + clock_debug("Expect T3312 (periodic RAU) timeout"); + osmo_select_main(0); + + /* Network sends GMM RAU Accept */ + llc_prim = gprs_llc_prim_alloc_ll_unitdata_ind(rand_tlli, OSMO_GPRS_LLC_SAPI_GMM, (uint8_t *)pdu_gmm_rau_acc, sizeof(pdu_gmm_rau_acc)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_gmm_prim_llc_lower_up(llc_prim); + OSMO_ASSERT(rc == 0); + /* update the used ptmsi to align with what was assigned from the network: */ + ptmsi = 0xec999002; + tlli = gprs_tmsi2tlli(ptmsi, TLLI_LOCAL); + (void)tlli; + /* As a result, GMM submits GMMSM-MODIFY.ind */ + /* As a result, MS answers GMM RAU Complete */ + /* DEACT: TODO */ printf("==== %s() [end] ====\n", __func__); diff --git a/tests/gmm/gmm_prim_test.err b/tests/gmm/gmm_prim_test.err index fa670cf..fa2d2a6 100644 --- a/tests/gmm/gmm_prim_test.err +++ b/tests/gmm/gmm_prim_test.err @@ -82,3 +82,19 @@ DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) READY timer started (expires in 44 seconds) DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) READY timer expired +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) T3312 started (expires in 600 seconds) +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) T3316 (Delete stored RAND & SRES timer) expired +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) T3312 Periodic RAU timer expired +DLGLOBAL INFO GMM_MS{Registered}: Received Event RAU_REQUESTED +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) Tx GMM RAU REQUEST +DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) READY timer started (expires in 44 seconds) +DLGLOBAL INFO GMM_MS{Registered}: state_chg to RAUInitidated +DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) Rx GMM RAU ACCEPT upd_result=0x00 +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ec999002:TLLI-ec999002) Tx GMM RAU COMPL +DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication +DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ec999002:TLLI-ec999002) READY timer started (expires in 10 seconds) +DLGLOBAL INFO GMM_MS{RAUInitidated}: Received Event RAU_ACCEPTED +DLGLOBAL INFO GMM_MS{RAUInitidated}: state_chg to Registered diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok index 6cf672a..62c58e3 100644 --- a/tests/gmm/gmm_prim_test.ok +++ b/tests/gmm/gmm_prim_test.ok @@ -8,7 +8,7 @@ test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0x80001234 new_TLLI=0xea711b41 test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41 test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ] -test_gmm_prim_up_cb(): Rx GMMREG-ATTACH.confirm accepted=1 allocated_ptmsi=0xea711b41 allocated_ptmsi_sig=0xffffffff +test_gmm_prim_up_cb(): Rx GMMREG-ATTACH.confirm accepted=1 allocated_ptmsi=0xea711b41 allocated_ptmsi_sig=0xffffffff allocated_tlli=0xea711b41 sys={44.000000}, mono={44.000000}: clock_override_add sys={44.000000}, mono={44.000000}: Expect T3314 (READY) timeout sys={644.000000}, mono={644.000000}: clock_override_add @@ -37,4 +37,15 @@ test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[0a 28 29 30 ] test_gmm_prim_up_cb(): Rx GMMSM-UNITDATA.indication sess_id=1234 sm_pdu=0a 28 29 30 +sys={44.000000}, mono={44.000000}: clock_override_add +sys={44.000000}, mono={44.000000}: Expect T3314 (READY) timeout +sys={644.000000}, mono={644.000000}: clock_override_add +sys={644.000000}, mono={644.000000}: Expect T3312 (periodic RAU) timeout +test_gmm_prim_llc_down_cb(): Rx LLGMM-SUSPEND.request TLLI=0xea711b41 +test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 08 03 32 f4 07 00 05 00 00 17 16 0a 00 e5 02 00 00 e1 ] +test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xea711b41 new_TLLI=0xec999002 +test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0xea711b41 new_tlli=0xec999002 +test_gmm_prim_up_cb(): Rx GMMSM-MODIFY.indication sess_id=1234 allocated_ptmsi=0xec999002 allocated_ptmsi_sig=0xffffffff allocated_tlli=0xec999002 +test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xec999002 SAPI=GMM l3=[08 0a ] +test_gmm_prim_llc_down_cb(): Rx LLGMM-RESUME.request TLLI=0xec999002 ==== test_gmm_prim_ms_gmmsm() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I81e207d44d88f18f0ee13fb413827606a6f830bc Gerrit-Change-Number: 33810 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul: Free TBF if submitting RACH.req fails
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33846 ) Change subject: rlcmac: tbf_ul: Free TBF if submitting RACH.req fails ...................................................................... rlcmac: tbf_ul: Free TBF if submitting RACH.req fails Change-Id: I63d68e524629a90931497d1181f134830b4819f9 --- M include/osmocom/gprs/rlcmac/tbf_ul_fsm.h M src/rlcmac/tbf_ul_ass_fsm.c M src/rlcmac/tbf_ul_fsm.c 3 files changed, 23 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h index b1f82e3..059dad4 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h @@ -34,6 +34,7 @@ enum tbf_ul_fsm_event { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, + GPRS_RLCMAC_TBF_UL_EV_UL_ASS_REJ, GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, GPRS_RLCMAC_TBF_UL_EV_N3104_MAX, GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK, /* data: struct tbf_ul_ass_ev_rx_ul_ack_nack* */ diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c index da6e7a7..35b6ca7 100644 --- a/src/rlcmac/tbf_ul_ass_fsm.c +++ b/src/rlcmac/tbf_ul_ass_fsm.c @@ -262,12 +262,18 @@ static void st_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gprs_rlcmac_tbf_ul_ass_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_ass_fsm_ctx *)fi->priv; + int rc; + switch (event) { case GPRS_RLCMAC_TBF_UL_ASS_EV_START: /* Inform the main TBF state about the assignment starting: */ osmo_fsm_inst_dispatch(ctx->ul_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, NULL); ctx->ass_type = *(enum gprs_rlcmac_tbf_ul_ass_type *)data; - submit_rach_req(ctx); + rc = submit_rach_req(ctx); + if (rc < 0) { + osmo_fsm_inst_dispatch(ctx->ul_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_UL_EV_UL_ASS_REJ, NULL); + break; + } tbf_ul_ass_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ASS_ST_WAIT_CCCH_IMM_ASS); break; case GPRS_RLCMAC_TBF_UL_ASS_EV_START_DIRECT_2PHASE: diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index 37d2e4a..2265aa4 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -33,6 +33,7 @@ static const struct value_string tbf_ul_fsm_event_names[] = { { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, "UL_ASS_START" }, { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, "UL_ASS_COMPL" }, + { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_REJ, "UL_ASS_REJ" }, { GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, "FIRST_UL_DATA_SENT" }, { GPRS_RLCMAC_TBF_UL_EV_N3104_MAX, "N3104_MAX" }, { GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK, "RX_UL_ACK_NACK" }, @@ -164,6 +165,9 @@ configure_ul_tbf(ctx); tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_FLOW); break; + case GPRS_RLCMAC_TBF_UL_EV_UL_ASS_REJ: + gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); + break; default: OSMO_ASSERT(0); } @@ -282,7 +286,8 @@ }, [GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN] = { .in_event_mask = - X(GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL), + X(GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL) | + X(GPRS_RLCMAC_TBF_UL_EV_UL_ASS_REJ), .out_state_mask = X(GPRS_RLCMAC_TBF_UL_ST_FLOW), .name = "ASSIGN", -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I63d68e524629a90931497d1181f134830b4819f9 Gerrit-Change-Number: 33846 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Fix null ptr dereference
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33847 ) Change subject: rlcmac: Fix null ptr dereference ...................................................................... rlcmac: Fix null ptr dereference Caught by ASan during test run. This can happen if gprs_rlcmac_ul_tbf_schedule_next_llc_frame() finds no more llc frames to submit during the loop iteration. Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0 --- M src/rlcmac/tbf_ul.c 1 file changed, 14 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index d9cd04a..0d78383 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -619,7 +619,7 @@ do { int payload_written = 0; - if (msgb_length(ul_tbf->llc_tx_msg) == 0) { + if (!ul_tbf->llc_tx_msg || msgb_length(ul_tbf->llc_tx_msg) == 0) { /* The data just drained, store the current fn */ if (ul_tbf->last_ul_drained_fn < 0) ul_tbf->last_ul_drained_fn = bi->fn; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0 Gerrit-Change-Number: 33847 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sndcp: Handle LL-ASSIGN.ind
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33841 ) Change subject: sndcp: Handle LL-ASSIGN.ind ...................................................................... sndcp: Handle LL-ASSIGN.ind Change-Id: I924dcf3ac9cbb15e26a5e9376f89ca098ab49e0b --- M src/sndcp/sndcp_prim.c 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/sndcp/sndcp_prim.c b/src/sndcp/sndcp_prim.c index b234d3c..80dff8f 100644 --- a/src/sndcp/sndcp_prim.c +++ b/src/sndcp/sndcp_prim.c @@ -536,6 +536,23 @@ return rc; } +static int gprs_sndcp_prim_handle_llc_ll_assign_ind(struct osmo_gprs_llc_prim *llc_prim) +{ + struct gprs_sndcp_mgmt_entity *snme; + + snme = gprs_sndcp_snme_find_by_tlli(llc_prim->ll.tlli); + if (!snme) { + LOGSNDCP(LOGL_ERROR, "SNDCP-LL-ASSIGN.ind: Message for non-existing SNDCP Entity (TLLI=%08x)\n", + llc_prim->ll.tlli); + return -EIO; + } + + LOGSNME(snme, LOGL_INFO, "TLLI update 0x%08x -> 0x%08x\n", + llc_prim->ll.tlli, llc_prim->ll.assign_ind.tlli_new); + snme->tlli = llc_prim->ll.assign_ind.tlli_new; + return 0; +} + int gprs_sndcp_prim_lower_up_llc_ll(struct osmo_gprs_llc_prim *llc_prim) { int rc; @@ -553,6 +570,9 @@ case OSMO_PRIM(OSMO_GPRS_LLC_LL_XID, PRIM_OP_CONFIRM): rc = gprs_sndcp_prim_handle_llc_ll_xid_cnf(llc_prim); break; + case OSMO_PRIM(OSMO_GPRS_LLC_LL_ASSIGN, PRIM_OP_INDICATION): + rc = gprs_sndcp_prim_handle_llc_ll_assign_ind(llc_prim); + break; default: rc = gprs_sndcp_prim_handle_llc_ll_unsupported(llc_prim); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I924dcf3ac9cbb15e26a5e9376f89ca098ab49e0b Gerrit-Change-Number: 33841 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Fix LOGPTBFDL macro log category
by pespin 20 Jul '23

20 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33851 ) Change subject: rlcmac: Fix LOGPTBFDL macro log category ...................................................................... rlcmac: Fix LOGPTBFDL macro log category Change-Id: I7f90981a114070ff13c508f0c6800cc1dd2cfe14 --- M include/osmocom/gprs/rlcmac/tbf_dl.h 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/gprs/rlcmac/tbf_dl.h b/include/osmocom/gprs/rlcmac/tbf_dl.h index 104b6e6..fe0b2ef 100644 --- a/include/osmocom/gprs/rlcmac/tbf_dl.h +++ b/include/osmocom/gprs/rlcmac/tbf_dl.h @@ -74,6 +74,6 @@ } #define LOGPTBFDL(dl_tbf, lvl, fmt, args...) \ - LOGP(g_rlcmac_log_cat[OSMO_GPRS_RLCMAC_LOGC_TBFUL], lvl, "TBF(DL:NR-%" PRIu8 ":TLLI-%08x) " fmt, \ + LOGP(g_rlcmac_log_cat[OSMO_GPRS_RLCMAC_LOGC_TBFDL], lvl, "TBF(DL:NR-%" PRIu8 ":TLLI-%08x) " fmt, \ (dl_tbf)->tbf.nr, (dl_tbf)->tbf.gre->tlli, \ ## args) -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7f90981a114070ff13c508f0c6800cc1dd2cfe14 Gerrit-Change-Number: 33851 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Fix null ptr dereference
by pespin 20 Jul '23

20 Jul '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33847 ) Change subject: rlcmac: Fix null ptr dereference ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0 Gerrit-Change-Number: 33847 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 20 Jul 2023 20:57:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.