This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/11265 Change subject: mncc: protect against non responsive MNCC during setup ...................................................................... mncc: protect against non responsive MNCC during setup When the SETUP is sent throgh the MNCC socket to the remote entity (e.g. osmo-sip-connector) we expect an almost immediate response that tells us if the call was accepted or rejected. However, there may be cases where the remote entity becomes unresponsive. In those cases the MNCC handling on the msc side would hang. Lets schedule a timer to make sure that osmo-msc can not hang if the setup is not answered. - Add timeout in gsm48_cc_rx_setup(), hard-clear the call when the timeout expires (CLEAR COMMAND to BSC) Change-Id: Ieaf6015d78ddef68827be107d3722c9d089f7c66 Related: OS#3599 --- M src/libmsc/gsm_04_08_cc.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/11265/1 diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 19e6cba..42f1b76 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -71,6 +71,8 @@ #include <assert.h> +#define MNCC_SETUP_TIMEOUT_T10303 25, 0 + static uint32_t new_callref = 0x80000001; @@ -351,6 +353,13 @@ static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); static int gsm48_cc_tx_disconnect(struct gsm_trans *trans, void *arg); +static void gsm48_cc_hard_clear(struct gsm_trans *trans) +{ + gsm48_stop_cc_timer(trans); + new_cc_state(trans, GSM_CSTATE_NULL); + trans_free(trans); +} + static void gsm48_cc_timeout(void *arg) { struct gsm_trans *trans = arg; @@ -400,6 +409,9 @@ case 0x323: disconnect = 1; break; + case 0x10303: + gsm48_cc_hard_clear(trans); + break; default: release = 1; } @@ -557,6 +569,10 @@ /* indicate setup to MNCC */ mncc_recvmsg(trans->net, trans, MNCC_SETUP_IND, &setup); + /* Normally MNCC should answer immediately, in order to protect + * against non responsive MNCC we schedule a timer. */ + gsm48_start_cc_timer(trans, 0x10303, MNCC_SETUP_TIMEOUT_T10303); + /* MNCC code will modify the channel asynchronously, we should * ipaccess-bind only after the modification has been made to the * lchan->tch_mode */ -- To view, visit https://gerrit.osmocom.org/11265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieaf6015d78ddef68827be107d3722c9d089f7c66 Gerrit-Change-Number: 11265 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181008/d4d2f946/attachment.htm>