lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38397?usp=email )
Change subject: SGSN: BSSGP_ConnHdlr: GMM Service Request: handle PMM IDLE UE correct ......................................................................
SGSN: BSSGP_ConnHdlr: GMM Service Request: handle PMM IDLE UE correct
24.008: 4.7.13.3: explicit mention the completion of the low layer security to be an implicit Security Command Accept if the UE is in PMM Idle. Extend the as_service_request() to handle both cases when UE is in PMM-IDLE as well in PMM-CONNECTED.
Change-Id: I29237997e414aea80f254247da54f909410a4b36 --- M sgsn/BSSGP_ConnHdlr.ttcn 1 file changed, 7 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/38397/1
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn index db09a5c..4bd16bb 100644 --- a/sgsn/BSSGP_ConnHdlr.ttcn +++ b/sgsn/BSSGP_ConnHdlr.ttcn @@ -677,23 +677,25 @@ }
/* Iu only */ -altstep as_service_request(integer ran_index := 0) runs on BSSGP_ConnHdlr { +altstep as_service_request(boolean ue_in_pmm_idle := true, integer ran_index := 0) runs on BSSGP_ConnHdlr { var PDU_DTAP_PS_MT mt;
- [] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_ACC)) -> value mt { + [not ue_in_pmm_idle] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_ACC)) -> value mt { setverdict(pass); } [] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_REJ)) { setverdict(fail, "Unexpected Service Reject"); mtc.stop; } + /* 24.008 4.7.13.3: a SecurityModeCommand is an explicit Service Accept if UE was in PMM-IDLE */ [] BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, uia_key := oct2bit(g_pars.vec.ik), key_sts := ?)) { var IntegrityProtectionAlgorithm uia_chosen := 0; /* 0 = standard_UMTS_integrity_algorithm_UIA1 */ BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen)); - BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi))) - repeat; + if (ue_in_pmm_idle) { + setverdict(pass); + } } }
@@ -729,7 +731,7 @@ }
alt { - [] as_service_request(ran_index) { setverdict(pass); } + [] as_service_request(ue_in_pmm_idle := true, ran_index := ran_index) { setverdict(pass); } [] as_gmm_auth(umts_aka_challenge := true, ran_index := ran_index) { repeat; } [] BSSAP.receive { repeat; } [] T.timeout {