diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-05-02 08:34:57 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-12 23:42:45 +0200 |
commit | 4c4cd7944bd54eceed3727ed4f1a4a5e1750bee3 (patch) | |
tree | 18945da882ffe86bf3c7e3cbf43f8186bdca04e0 /src/gprs/sgsn_libgtp.c | |
parent | 8ca6e51bf76cbd9c7609d7d4cfd858f784a87b0e (diff) |
IuPS adjustments
SGSN: Don't indicate GERAN in Iu mode PDP CTX ACT REQ to GGSN
sgsn_ranap_iu_event: handle some events without valid MM context
sgsn init: pass sgsn_config pointer to sgsn_vty_init(), not sgsn_parse_config
Change-Id: Ie6b6e5422987586531a898e0c5b867623dbecb0f
IuPS: cosmetic: explicitly check RAN type; move comment
Diffstat (limited to 'src/gprs/sgsn_libgtp.c')
-rw-r--r-- | src/gprs/sgsn_libgtp.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c index 001e61146..cd1093167 100644 --- a/src/gprs/sgsn_libgtp.c +++ b/src/gprs/sgsn_libgtp.c @@ -247,12 +247,8 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, memcpy(pdp->gsnlu.v, &sgsn->cfg.gtp_listenaddr.sin_addr, sizeof(sgsn->cfg.gtp_listenaddr.sin_addr)); - /* Assume we are a GERAN system */ - pdp->rattype.l = 1; - pdp->rattype.v[0] = 2; - pdp->rattype_given = 1; - - /* Include RAI and ULI all the time */ + /* Routing Area Identifier with LAC and RAC fixed values, as + * requested in 29.006 7.3.1 */ pdp->rai_given = 1; pdp->rai.l = 6; raid = mmctx->ra; @@ -260,10 +256,24 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, raid.rac = 0xFF; gsm48_construct_ra(pdp->rai.v, &raid); - pdp->userloc_given = 1; - pdp->userloc.l = 8; - pdp->userloc.v[0] = 0; /* CGI for GERAN */ - bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->gb.cell_id); + pdp->rattype.l = 1; + pdp->rattype_given = 1; + + switch (mmctx->ran_type) { + case MM_CTX_T_GERAN_Gb: + case MM_CTX_T_GERAN_Iu: + pdp->rattype.v[0] = 2; + /* User Location Information */ + pdp->userloc_given = 1; + pdp->userloc.l = 8; + pdp->userloc.v[0] = 0; /* CGI for GERAN */ + bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->gb.cell_id); + break; + case MM_CTX_T_UTRAN_Iu: + pdp->rattype.v[0] = 1; + /* FIXME: Optional User Location Information with SAI */ + break; + } /* include the IMEI(SV) */ pdp->imeisv_given = 1; |