Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/27916 )
Change subject: CM Serv Rej: do not crash on use count mismatch
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> does it make sense to send a CM Serv Rej despite no CM Serv Request was sent in first place? Probabl […]
IIUC the sequence of events is:
CM Serv Req received,
MSC does not allow CM Serv Req for some reason (hence no use count),
still wants to send CM Serv Rej message,
there is no use count to decrease,
entire MSC shuts down.
I think some time could be spent on reviewing the CM Service use tokens, but
that's likely nontrivial (IOW i'm lazy). What I'm sure of is that we don't want
to shut down the entire MSC just because some minor use count got confused.
--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 25 Apr 2022 21:31:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27915 )
Change subject: bsc: TC_emerg_premption: check BSSMAP Clear Req cause
......................................................................
bsc: TC_emerg_premption: check BSSMAP Clear Req cause
On the first TCH, establish Layer 3 so that the BSC will issue a Clear
Request at all.
Verify the cause value of the Clear Request.
Tear down the established Layer 3: clean up for the leak check.
Related: OS#5535
Depends: I20108f7b4769400b89b7b0d65c8dab883bf87c46 (osmo-bsc)
Change-Id: Ib13be73119cfc96712f32899c02e655e1751d547
---
M bsc/BSC_Tests.ttcn
1 file changed, 21 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
neels: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 59b87dd..5779990 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9029,6 +9029,12 @@
var octetstring l3 := '00010203040506'O;
f_ipa_tx(0, ts_RSL_EST_IND(first_tch, valueof(ts_RslLinkID_DCCH(0)), l3));
+ /* Accept BSSAP conn, so we get to test the Clear Request cause */
+ var BSSAP_N_CONNECT_ind rx_c_ind;
+ BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) -> value rx_c_ind;
+ var integer sccp_conn_id := rx_c_ind.connectionId;
+ BSSAP.send(ts_BSSAP_CONNECT_res(rx_c_ind.connectionId));
+
/* Send Channel request for emegergency call */
f_ipa_tx(0, ts_RSL_CHAN_RQD('A5'O, 23));
@@ -9036,6 +9042,15 @@
f_expect_chan_rel(0, first_tch, expect_rr_chan_rel := true, expect_rll_rel_req := false,
expect_rr_cause := GSM48_RR_CAUSE_PREMPTIVE_REL);
+ /* Also expect a BSSMAP Clear Request with PREEMPTION */
+ var BSSAP_N_DATA_ind rx_clear_req;
+ const myBSSMAP_Cause preemption := GSM0808_CAUSE_PREEMPTION;
+ BSSAP.receive(tr_BSSAP_DATA_ind(sccp_conn_id, tr_BSSMAP_ClearRequest)) -> value rx_clear_req;
+ log("XXX ", rx_clear_req);
+ if (rx_clear_req.userData.pdu.bssmap.clearRequest.cause.causeValue != int2bit(enum2int(preemption), 7)) {
+ setverdict(fail, "BSSMAP Clear Request: expected cause PREEMPTION");
+ }
+
/* Expect the BSC to send activate/assign the channel for the emergency call */
rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
if (first_tch != rx_rsl.ies[0].body.chan_nr) {
@@ -9044,6 +9059,12 @@
f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(first_tch, 33));
rx_rsl := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
+ /* complete the BSSMAP Clear to satisfy the conn leak check */
+ BSSAP.send(ts_BSSAP_DATA_req(sccp_conn_id, ts_BSSMAP_ClearCommand(enum2int(preemption))));
+ BSSAP.receive(tr_BSSAP_DATA_ind(sccp_conn_id, tr_BSSMAP_ClearComplete)) {
+ BSSAP.send(ts_BSSAP_DISC_req(sccp_conn_id, 0));
+ }
+
f_shutdown_helper();
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27915
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: Ib13be73119cfc96712f32899c02e655e1751d547
Gerrit-Change-Number: 27915
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( 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(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
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 c50cfeb..627af11 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: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged