aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-12 22:00:22 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-17 17:23:57 +0200
commit6ddb6ac0284ccfcfc538af175c0cde8beb13f7c5 (patch)
treefbdeab0238daf1b73d30447aabcf24dd49ceba6e
parent22093ef9641c7685c87b5ed80333bcfc273efcad (diff)
sgsn: Encode the ULI for the PDP context creation ack
Give the GGSN another opportunity to determine which tarif to apply for the SGSN/subscriber. This code assumes tha the RAN is a GERAN system but the assumption has been made in other places as well.
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index 07dbc2602..008ec1e6a 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -227,11 +227,16 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
pdp->rattype.v[0] = 2;
pdp->rattype_given = 1;
- /* include the routing area identity all the time */
+ /* Include RAI and ULI all the time */
pdp->rai_given = 1;
pdp->rai.l = 6;
gsm48_construct_ra(pdp->rai.v, &mmctx->ra);
+ 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->cell_id);
+
/* change pdp state to 'requested' */
pctx->state = PDP_STATE_CR_REQ;