From 02d4608b6b81d61869699cd4b8c5aa905aec21a5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 28 Jan 2018 15:31:54 +0100 Subject: Introduce T993210 to release lchan + subscr_conn if MSC fails to respond The GSM specs don't have an explicit timer for this, so let's introdcue a custom timer (hence starting with 99). This timeout catches the following situation: * we send a SCCP CR with COMPL_L3_INFO from the MS to the MSC, * the MSC doesn't respond (e.g. SCCP routing failure, program down, ...) The MS is supposed to timeout with T3210, 3220 or 3230. But the BSC shouldn't trust the MS but have some timer on its own. SCCP would have a timer T(conn est), but that one is specified to be 1-2min and hence rather long. Closes: OS#2775 Change-Id: Ie11d7d06353ba1b1e2fab6763dd7b032ce8a5d2c --- src/osmo-bsc/bsc_subscr_conn_fsm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index d12cd1321..8d18f81c1 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -100,8 +100,11 @@ static void gscon_fsm_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) rc = osmo_bsc_sigtran_open_conn(conn, msg); if (rc < 0) { osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); - } else - osmo_fsm_inst_state_chg(fi, ST_WAIT_CC, 0, 0); + } else { + /* SCCP T(conn est) is 1-2 minutes, way too long. The MS will timeout + * using T3210 (20s), T3220 (5s) or T3230 (10s) */ + osmo_fsm_inst_state_chg(fi, ST_WAIT_CC, 20, 993210); + } break; case GSCON_EV_A_CONN_IND: scu_prim = data; @@ -425,6 +428,11 @@ static int gscon_timer_cb(struct osmo_fsm_inst *fi) struct msgb *resp = NULL; switch (fi->T) { + case 993210: + /* MSC has not responded/confirmed connection witH CC */ + /* N-DISCONNET.req is sent in gscon_cleanup() above */ + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL); + break; case 10: /* Assignment Failed */ resp = gsm0808_create_assignment_failure(GSM0808_CAUSE_RADIO_INTERFACE_FAILURE, NULL); osmo_bsc_sigtran_send(conn, resp); -- cgit v1.2.3