diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-17 10:11:19 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-18 10:26:09 +0100 |
commit | f70997db90564429cdb93ee34735449cb0dc1a4e (patch) | |
tree | 70157dcc63f2a6acd8f7c0d046d26c3fe32b134d /sgsn | |
parent | 311ec27f42a4e030ea1e4be758e011119b135f66 (diff) |
sgsn: Implement TLLI assignment/modification/unassignment
It's important that we implement the proper TLLI handling whenever our
P-TMSI changes.
Change-Id: I5b95b9e49f0a1db9659714c4d01f340fd44fafe8
Diffstat (limited to 'sgsn')
-rw-r--r-- | sgsn/SGSN_Tests.ttcn | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 70e8124..a59bde3 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -69,6 +69,7 @@ type record BSSGP_ConnHdlrPars { OCT3 p_tmsi_sig optional, /* TLLI of the simulated MS */ OCT4 tlli, + OCT4 tlli_old optional, RoutingAreaIdentificationV ra optional, BssgpCellId bssgp_cell_id, AuthVector vec optional, @@ -168,6 +169,7 @@ runs on test_CT return BSSGP_ConnHdlr { p_tmsi := omit, p_tmsi_sig := omit, tlli := f_gprs_tlli_random(), + tlli_old := omit, ra := omit, bssgp_cell_id := gb.cfg.cell_id, vec := omit, @@ -278,6 +280,14 @@ function f_gmm_auth () runs on BSSGP_ConnHdlr { deactivate(di); } +function f_upd_ptmsi_and_tlli(OCT4 p_tmsi) runs on BSSGP_ConnHdlr { + g_pars.p_tmsi := p_tmsi; + /* update TLLI */ + g_pars.tlli_old := g_pars.tlli; + g_pars.tlli := g_pars.p_tmsi or4b 'c0000000'O; + f_bssgp_client_llgmm_assign(g_pars.tlli_old, g_pars.tlli); +} + function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr { /* mandatory IE */ g_pars.ra := aa.routingAreaIdentification; @@ -286,8 +296,7 @@ function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr setverdict(fail, "unexpected P-TMSI allocation"); self.stop; } - g_pars.p_tmsi := aa.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets; - /* update TLLI? */ + f_upd_ptmsi_and_tlli(aa.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets); } if (ispresent(aa.msIdentity)) { setverdict(fail, "unexpected TMSI allocation in non-combined attach"); |