diff options
author | Oliver Smith <osmith@sysmocom.de> | 2019-07-23 10:43:36 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2019-07-24 09:08:22 +0200 |
commit | c0a5e71d0ec2c3e2d37dc9e5fec0c2752086babb (patch) | |
tree | b8aa8c83307be1b1ae4d8a01695dbc9bbaa2fb0d /src/libvlr | |
parent | fdda613af57d18b5b292b209d440492da4b4c877 (diff) |
vlr_lu_fsm.c: don't send LU reject twice
Don't call tx_lu_rej() in the "vlr_lu_compl" FSM. It is always getting
called in the parent "lu" FSM and is therefore redundant:
_vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, cause)
-> osmo_fsm_inst_state_chg(fi, LU_COMPL_VLR_S_DONE, 0, 0)
-> vlr_lu_compl_fsm_dispatch_result()
-> lu_fsm_wait_lu_compl()/lu_fsm_wait_lu_compl_standalone()
-> lu_fsm_failure()
-> lfp->vlr->ops.tx_lu_rej()
I have noticed the bug with the TTCN3 tests. This patch fixes
TC_lu_imsi_auth_tmsi_check_imei_{nack,err} after stricter checking
in [1] and also TC_iu_mo_crcx_ran_reject.
[1] I836f76242463789c4c003feec757714827f2a31b (osmo-ttcn3-hacks)
Change-Id: I127b27937613ea0ff29d67991c0414fca6d441d9
Diffstat (limited to 'src/libvlr')
-rw-r--r-- | src/libvlr/vlr_lu_fsm.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 9dff4aa2d..87bf7a5f2 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -366,13 +366,6 @@ static void vlr_lu_compl_fsm_success(struct osmo_fsm_inst *fi) vlr_sgs_fsm_update_id(vsub); } -static void vlr_lu_compl_fsm_failure(struct osmo_fsm_inst *fi, uint8_t cause) -{ - struct lu_compl_vlr_priv *lcvp = lu_compl_vlr_fi_priv(fi); - lcvp->vsub->vlr->ops.tx_lu_rej(lcvp->msc_conn_ref, cause); - _vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, cause); -} - static void vlr_lu_compl_fsm_dispatch_result(struct osmo_fsm_inst *fi, uint32_t prev_state) { @@ -434,8 +427,7 @@ static void lu_compl_vlr_new_tmsi(struct osmo_fsm_inst *fi) LOGPFSM(fi, "%s()\n", __func__); if (vlr_subscr_alloc_tmsi(vsub)) { - vlr_lu_compl_fsm_failure(fi, - GSM48_REJECT_SRV_OPT_TMP_OUT_OF_ORDER); + _vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, GSM48_REJECT_SRV_OPT_TMP_OUT_OF_ORDER); return; } @@ -495,15 +487,14 @@ static void lu_compl_vlr_wait_imei(struct osmo_fsm_inst *fi, uint32_t event, case LU_COMPL_VLR_E_IMEI_CHECK_ACK: if (!vsub->imei[0]) { /* Abort: Do nothing */ - vlr_lu_compl_fsm_failure(fi, - GSM48_REJECT_PROTOCOL_ERROR); + _vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, GSM48_REJECT_PROTOCOL_ERROR); return; } /* Pass */ break; case LU_COMPL_VLR_E_IMEI_CHECK_NACK: - vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_ILLEGAL_ME); + _vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, GSM48_REJECT_ILLEGAL_ME); /* FIXME: IMEI Check Fail to VLR Application (Detach IMSI VLR) */ return; } @@ -544,7 +535,7 @@ static void lu_compl_vlr_wait_tmsi(struct osmo_fsm_inst *fi, uint32_t event, LOGPFSML(fi, LOGL_ERROR, "TMSI Realloc Compl implies that" " the subscriber has a new TMSI allocated, but" " the new TMSI is unset.\n"); - vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE); + _vlr_lu_compl_fsm_done(fi, VLR_FSM_RESULT_FAILURE, GSM48_REJECT_NETWORK_FAILURE); return; } |