Change in ...osmo-msc[master]: vlr_lu_fsm.c: don't send LU reject twice

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/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Jul 24 11:33:12 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-msc/+/14899 )

Change subject: vlr_lu_fsm.c: don't send LU reject twice
......................................................................

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
---
M src/libvlr/vlr_lu_fsm.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
2 files changed, 4 insertions(+), 15 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved



diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index 9dff4aa..87bf7a5 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -366,13 +366,6 @@
 	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 @@
 	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 @@
 	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 @@
 		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;
 	}
 
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
index 0a18302..c9be4ef 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -1907,7 +1907,6 @@
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx)
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_NACK
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_NACK
-- sending LU Reject for IMSI-901700000004620:MSISDN-46071:GERAN-A:LU, cause 6
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_FAILURE
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)
@@ -2174,7 +2173,6 @@
 DVLR SUBSCR(IMSI-901700000004620:MSISDN-46071) Check_IMEI_VLR failed; gmm_cause: Invalid mandatory information
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_NACK
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_NACK
-- sending LU Reject for IMSI-901700000004620:MSISDN-46071:GERAN-A:LU, cause 6
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE
 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_FAILURE
 DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14899
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I127b27937613ea0ff29d67991c0414fca6d441d9
Gerrit-Change-Number: 14899
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190724/ef555eec/attachment.htm>


More information about the gerrit-log mailing list