aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-05-21 00:16:55 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-02 04:28:31 +0200
commit3ecfbbba6f9df1fa57032fcdcba0a83d702be6f5 (patch)
treec17b7e66ab79fdc64dc8364bfce7a88b8f918ac0 /openbsc/src/gprs/gprs_gmm.c
parent770f3e32e00f70c668e9981e1b17c1f6c4d4ac06 (diff)
IuPS: send Security Mode Command, track the new_key flag.
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 7d00bd5bc..14043cea5 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -612,6 +612,9 @@ static int gsm48_rx_gmm_auth_ciph_resp(struct sgsn_mm_ctx *ctx,
ctx->is_authenticated = 1;
+ if (ctx->ran_type == MM_CTX_T_UTRAN_Iu)
+ ctx->iu.new_key = 1;
+
/* FIXME: enable LLC cipheirng */
/* Check if we can let the mobile station enter */
@@ -690,6 +693,9 @@ static void extract_subscr_hlr(struct sgsn_mm_ctx *ctx)
/* Check if we can already authorize a subscriber */
static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
{
+#ifdef BUILD_IU
+ int rc;
+#endif
#ifndef PTMSI_ALLOC
struct sgsn_signal_data sig_data;
#endif
@@ -743,6 +749,13 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
}
/* The MS is authorized */
+#ifdef BUILD_IU
+ if (ctx->ran_type == MM_CTX_T_UTRAN_Iu && !ctx->iu.ue_ctx->integrity_active) {
+ rc = iu_tx_sec_mode_cmd(ctx->iu.ue_ctx, &ctx->auth_triplet, 0, ctx->iu.new_key);
+ ctx->iu.new_key = 0;
+ return rc;
+ }
+#endif
switch (ctx->pending_req) {
case 0: