From 932ccf87a0eede73514bf95d403efd5189dbe792 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 16 Apr 2019 09:08:22 +0200 Subject: gprs_gmm: reintroduce calling gsm48_gmm_authorize when not handling GMM Attach Requests A security command is part of multiple procedures to ensure integrity (optional also encryption) between MS and RNC. It should be used for all Iu connections once. With the rewrite of the GMM Attach FSM the use of the security command procedure was broken for all procedures e.g. Service Request except GMM Attach Request. Relates: OS#3920 Change-Id: I50e8e316f06ae1a6171a6b07e4e2f0761322b779 --- src/gprs/gprs_gmm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index b0c59029a..358bff909 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -205,7 +205,12 @@ int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type REQUIRE_MM /* Continue authentication here */ mm->iu.ue_ctx->integrity_active = 1; - osmo_fsm_inst_dispatch(mm->gmm_att_req.fsm, E_IU_SECURITY_CMD_COMPLETE, NULL); + + /* FIXME: remove gmm_authorize */ + if (mm->pending_req != GSM48_MT_GMM_ATTACH_REQ) + gsm48_gmm_authorize(mm); + else + osmo_fsm_inst_dispatch(mm->gmm_att_req.fsm, E_IU_SECURITY_CMD_COMPLETE, NULL); break; default: LOGP(DRANAP, LOGL_NOTICE, "Unknown event received: %i\n", type); -- cgit v1.2.3