neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/27916 )
Change subject: CM Serv Rej: do not crash on use count mismatch
......................................................................
CM Serv Rej: do not crash on use count mismatch
We may issue a CM Service Reject also in obscure situations, where no CM
Service Request was permitted. In those cases, there will be no use
count. Do not crash then, just don't decrement.
Related: OS#5532
Change-Id: I2009df42d1f27ec0d011e22bfc46dbc17afe7239
---
M src/libmsc/gsm_04_08.c
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/27916/1
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index b5d46fd..0983295 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1513,8 +1513,15 @@
enum gsm48_reject_value cause)
{
struct msc_a *msc_a = msc_conn_ref;
+ const char *use_token;
msc_gsm48_tx_mm_serv_rej(msc_a, cause);
- msc_a_put(msc_a, msc_a_cm_service_type_to_use(cm_service_type));
+
+ /* Normally, there is a use count to be removed by the CM Service Reject.
+ * There has been a report though of an error situation (OS#5532) where no use count remains to be removed here.
+ * In that case, do not crash osmo-msc, just don't decrement it. */
+ use_token = msc_a_cm_service_type_to_use(cm_service_type);
+ if (osmo_use_count_by(&msc_a->use_count, use_token))
+ msc_a_put(msc_a, use_token);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/27916
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I2009df42d1f27ec0d011e22bfc46dbc17afe7239
Gerrit-Change-Number: 27916
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27914 )
Change subject: emerg call: send BSSMAP Clear Req cause as preemption
......................................................................
emerg call: send BSSMAP Clear Req cause as preemption
After the lchan release, the gscon would go into the Clear dance with an
arbitrary cause value. Instead, explicitly ask for a Clear upon
pre-emption, with the proper cause value.
Related: OS#5535
Change-Id: I20108f7b4769400b89b7b0d65c8dab883bf87c46
---
M include/osmocom/bsc/bsc_subscr_conn_fsm.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
3 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/27914/1
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index 0e495aa..0ab4843 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -66,6 +66,7 @@
void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg, int link_id, int allow_sacch);
int gscon_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *msg);
+void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, enum gsm0808_cause cause);
struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct gsm_subscriber_connection *conn,
uint16_t msc_assigned_cic, struct gsm_lchan *for_lchan);
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index e94d688..2034e6f 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2058,6 +2058,11 @@
"CHAN RQD/EMERGENCY-PRIORITY: inducing termination of lchan %s (state:%s) in favor of incoming EMERGENCY CALL!\n",
gsm_lchan_name(release_lchan), osmo_fsm_inst_state_name(release_lchan->fi));
+ /* Make sure the Clear Request to the MSC has the proper cause */
+ if (release_lchan->conn)
+ gscon_bssmap_clear(release_lchan->conn, GSM0808_CAUSE_PREEMPTION);
+ /* The gscon FSM would only release the lchan after the MSC responds with a Clear Command.
+ * But we need it released right now. Also with the right RR cause. */
lchan_release(release_lchan, !!(release_lchan->conn), true, GSM48_RR_CAUSE_PREMPTIVE_REL,
gscon_last_eutran_plmn(release_lchan->conn));
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index bb96aeb..428d200 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -144,8 +144,7 @@
return rc;
}
-static void gscon_bssmap_clear(struct gsm_subscriber_connection *conn,
- enum gsm0808_cause cause)
+void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, enum gsm0808_cause cause)
{
/* already clearing? */
switch (conn->fi->state) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27914
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I20108f7b4769400b89b7b0d65c8dab883bf87c46
Gerrit-Change-Number: 27914
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27905
to look at the new patch set (#2).
Change subject: bsc: TC_emerg_premption: clarify chan_nr
......................................................................
bsc: TC_emerg_premption: clarify chan_nr
Rename chan_nr to first_tch, and more clearly show that the TCH that is
released gets assigned to the emergency call.
Related: OS#5534
Change-Id: I0c540d76eedfd4115b410921bf5a0b6c2d00b5c2
---
M bsc/BSC_Tests.ttcn
1 file changed, 8 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/27905/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27905
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: I0c540d76eedfd4115b410921bf5a0b6c2d00b5c2
Gerrit-Change-Number: 27905
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27906
to look at the new patch set (#2).
Change subject: bsc: TC_emerg_premption: test RR rel cause
......................................................................
bsc: TC_emerg_premption: test RR rel cause
Related: OS#5534
Depends: I0423621d15ace11a53ae1653e5e7f5cb93605edb (osmo-bsc)
Change-Id: I47e919edc25a8427f49d654f97f05e46a89da16d
---
M bsc/BSC_Tests.ttcn
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/27906/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27906
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: I47e919edc25a8427f49d654f97f05e46a89da16d
Gerrit-Change-Number: 27906
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27905 )
Change subject: bsc: TC_emerg_premption: cosmetic
......................................................................
Patch Set 1:
(1 comment)
File bsc/BSC_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27905/comment/ebf0314f_35f1…
PS1, Line 8976: if (first_tch != rx_rsl.ies[0].body.chan_nr) {
> This goes beyond the scope of a 'cosmetic' change. You're basically adding more checks.
debatable, because this check can never trigger.
We occupy all lchans, then free one and again activate that one.
Just before, it wasn't as obvious that it will be the same one.
We would take the chan_nr from the RSL, but it *has* to be the same first_tch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27905
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: I0c540d76eedfd4115b410921bf5a0b6c2d00b5c2
Gerrit-Change-Number: 27905
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 24 Apr 2022 20:17:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment