Attention is currently required from: laforge, lynxis lazus, msuraev.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/32511 )
Change subject: hlr: use talloc for memory allocation in osmo_gsup_create_insert_subscriber_data_msg
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File include/osmocom/hlr/gsup_server.h:
https://gerrit.osmocom.org/c/osmo-hlr/+/32511/comment/b8773d67_d23434e3
PS3, Line 71: osmo_gsup_create_insert_subscriber_data_msg
> The header won't be installed and can't be used by other projects
Ah, indeed. There exists `libosmo-gsup-client`, but not `libosmo-gsup-server`. Still I find it wrong that the symbol names here start with `osmo_`. Anyways, not related to this patch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/32511
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I00b5c2dfadcf6e0740e93b4c3292d2654d22e80c
Gerrit-Change-Number: 32511
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 02 May 2023 17:56:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-MessageType: comment
Attention is currently required from: laforge, fixeria.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/32560
to look at the new patch set (#2).
Change subject: oml: reset BCCH carrier power reduction mode (if enabled)
......................................................................
oml: reset BCCH carrier power reduction mode (if enabled)
We should not maintain BCCH carrier power reduction mode if we loose
connection to the BSC. When entering NM_BTS_ST_OP_DISABLED_OFFLINE,
reset the related state fields if it was enabled.
Change-Id: I34468e3fccc490f48e30b159b63308a395b65fa9
Related: SYS#6435
---
M src/common/nm_bts_fsm.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/32560/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32560
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I34468e3fccc490f48e30b159b63308a395b65fa9
Gerrit-Change-Number: 32560
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32572 )
Change subject: gmm: Switch state before announcing events to user
......................................................................
gmm: Switch state before announcing events to user
Update the state in the FSM before triggering paths implemented by the
user which may also again interact with the FSM. If the state is not
updated earlier, then the new interactions may encounter the FSM in an
unexpected state with regards to the event received.
Change-Id: I10eb23f6db5ff3b0b90f9066aa4fa44c8cb85170
---
M include/osmocom/gprs/gmm/gmm_ms_fsm.h
M src/gmm/gmm_ms_fsm.c
2 files changed, 49 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/72/32572/1
diff --git a/include/osmocom/gprs/gmm/gmm_ms_fsm.h b/include/osmocom/gprs/gmm/gmm_ms_fsm.h
index 16bd022..516801e 100644
--- a/include/osmocom/gprs/gmm/gmm_ms_fsm.h
+++ b/include/osmocom/gprs/gmm/gmm_ms_fsm.h
@@ -42,28 +42,31 @@
GPRS_GMM_MS_EV_LOW_LVL_FAIL,
};
+/* Info about last initiated attach: */
+struct gprs_gmm_ms_fsm_attach_ctx {
+ enum osmo_gprs_gmm_attach_type type;
+ bool with_imsi;
+ bool explicit_att; /* true if by SMREG-ATTACH.req requested it */
+ bool implicit_att; /* true if GMMSM-ESTABLISH.req requested it */
+ /* Session Ids waiting for attach to happen during implicit_att: */
+ uint32_t sess_id[16];
+ uint8_t num_sess_id;
+ /* Retransmission of ATTACH REQUEST (T3310) */
+ uint8_t req_attempts;
+};
+
+/* Info about last initiated detach: */
+struct gprs_gmm_ms_fsm_detach_ctx {
+ enum osmo_gprs_gmm_detach_ms_type type;
+ enum osmo_gprs_gmm_detach_poweroff_type poweroff_type;
+};
+
struct gprs_gmm_ms_fsm_ctx {
struct osmo_fsm_inst *fi;
struct gprs_gmm_entity *gmme;
- /* Info about last initiated attach: */
- struct {
- enum osmo_gprs_gmm_attach_type type;
- bool with_imsi;
- bool explicit_att; /* true if by SMREG-ATTACH.req requested it */
- bool implicit_att; /* true if GMMSM-ESTABLISH.req requested it */
- /* Session Ids waiting for attach to happen during implicit_att: */
- uint32_t sess_id[16];
- uint8_t num_sess_id;
- /* Retransmission of ATTACH REQUEST (T3310) */
- uint8_t req_attempts;
- } attach;
-
- /* Info about last initiated detach: */
- struct {
- enum osmo_gprs_gmm_detach_ms_type type;
- enum osmo_gprs_gmm_detach_poweroff_type poweroff_type;
- } detach;
+ struct gprs_gmm_ms_fsm_attach_ctx attach;
+ struct gprs_gmm_ms_fsm_detach_ctx detach;
};
int gprs_gmm_ms_fsm_init(void);
diff --git a/src/gmm/gmm_ms_fsm.c b/src/gmm/gmm_ms_fsm.c
index 93dd397..85aa6bf 100644
--- a/src/gmm/gmm_ms_fsm.c
+++ b/src/gmm/gmm_ms_fsm.c
@@ -104,6 +104,7 @@
struct gprs_gmm_ms_fsm_ctx *ctx = (struct gprs_gmm_ms_fsm_ctx *)fi->priv;
uint8_t cause;
int rc;
+ struct gprs_gmm_ms_fsm_attach_ctx att;
switch (event) {
case GPRS_GMM_MS_EV_ATTACH_REQUESTED:
@@ -114,28 +115,36 @@
cause = *(uint8_t *)data;
/* fall-through */
case GPRS_GMM_MS_EV_LOW_LVL_FAIL:
+ /* Update state before announcing event to users. Moving to
+ * Deregistered reset attach ctx, hence do a tmp copy here: */
+ memcpy(&att, &ctx->attach, sizeof(att));
+ gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_DEREGISTERED);
+
if (event == GPRS_GMM_MS_EV_LOW_LVL_FAIL)
cause = GMM_CAUSE_MAC_FAIL;
- if (ctx->attach.explicit_att) {
+
+ if (att.explicit_att) {
/* Submit GMMREG-ATTACH-REJ as per TS 24.007 Annex C.1 */
rc = gprs_gmm_submit_gmmreg_attach_cnf(ctx->gmme, false, cause);
if (rc < 0)
return;
}
- if (ctx->attach.implicit_att) {
+
+ if (att.implicit_att) {
/* Submit GMMSM-ESTABLISH-CNF as per TS 24.007 Annex C.3 */
unsigned int i;
- for (i = 0; i < ctx->attach.num_sess_id; i++) {
+ for (i = 0; i < att.num_sess_id; i++) {
rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme,
- ctx->attach.sess_id[i],
+ att.sess_id[i],
false, cause);
if (rc < 0)
return;
}
}
- gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_DEREGISTERED);
break;
case GPRS_GMM_MS_EV_ATTACH_ACCEPTED:
+ /* Update state before announcing event to users. */
+ gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_REGISTERED);
if (ctx->attach.explicit_att) {
/* Submit GMMREG-ATTACH-CNF as per TS 24.007 Annex C.1 */
rc = gprs_gmm_submit_gmmreg_attach_cnf(ctx->gmme, true, 0);
@@ -151,7 +160,6 @@
return;
}
}
- gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_REGISTERED);
break;
case GPRS_GMM_MS_EV_DETACH_REQUESTED:
gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_DEREGISTERED);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32572
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I10eb23f6db5ff3b0b90f9066aa4fa44c8cb85170
Gerrit-Change-Number: 32572
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: laforge, fixeria, lynxis lazus, msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/32511 )
Change subject: hlr: use talloc for memory allocation in osmo_gsup_create_insert_subscriber_data_msg
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS3:
> Can you point exactly where's the problem? afaict all the buffers being used are of known max size t […]
I'm still waiting for answer here before adding any +1.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/32511
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I00b5c2dfadcf6e0740e93b4c3292d2654d22e80c
Gerrit-Change-Number: 32511
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 02 May 2023 15:35:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32571 )
Change subject: llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req
......................................................................
llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req
Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
---
M src/llc/llc_llgmm.c
1 file changed, 20 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/71/32571/1
diff --git a/src/llc/llc_llgmm.c b/src/llc/llc_llgmm.c
index cd8c189..5834041 100644
--- a/src/llc/llc_llgmm.c
+++ b/src/llc/llc_llgmm.c
@@ -153,16 +153,24 @@
/* If TLLI old == TLLI_UNASSIGNED was assigned to LLME, then this is
* TLLI assignmemt according to 8.3.1 */
llme->old_tlli = TLLI_UNASSIGNED;
- llme->tlli = new_tlli;
llme->state = OSMO_GPRS_LLC_LLMS_ASSIGNED;
/* 8.5.3.1 For all LLE's */
for (i = 0; i < ARRAY_SIZE(llme->lle); i++) {
struct gprs_llc_lle *l = &llme->lle[i];
- l->vu_send = l->vu_recv = 0;
- l->retrans_ctr = 0;
l->state = OSMO_GPRS_LLC_LLES_ASSIGNED_ADM;
+ if (llme->tlli != new_tlli) {
+ /* Only reset state if the new tlli is really changing.
+ * During GMM attachment, the TLLI is already known and
+ * used by LLC (LLME allocated on the fly), and hence it
+ * is expected to keep using previous state with the
+ * same TLLI from here onwards.
+ */
+ l->vu_send = l->vu_recv = 0;
+ l->retrans_ctr = 0;
+ }
/* FIXME Set parameters according to table 9 */
}
+ llme->tlli = new_tlli;
}
} else if (old_tlli != TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) {
/* TLLI Change 8.3.2 */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32571
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
Gerrit-Change-Number: 32571
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange