summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-04-08 17:35:53 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2016-04-08 18:04:04 +0200
commitbae25944247513cbed329ba6d2997412593e981b (patch)
tree78b5316af26ad6cf365c8c34581e316091a0f3e7 /openbsc
parent5e007d9445b1fe0233b8d4618d6c1a01ec446788 (diff)
gprs: Save integrity protection status inside ue ctx, not mm ctx
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h5
-rw-r--r--openbsc/include/openbsc/iu.h1
-rw-r--r--openbsc/src/gprs/gprs_gmm.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 28c319f59..0ff2c7383 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -107,6 +107,8 @@ struct service_info {
uint16_t pdp_status;
};
+struct ue_conn_ctx;
+
/* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */
/* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */
struct sgsn_mm_ctx {
@@ -146,9 +148,8 @@ struct sgsn_mm_ctx {
/* CSG Subscription Data */
/* LIPA Allowed */
/* Voice Support Match Indicator */
- void *ue_ctx;
+ struct ue_conn_ctx *ue_ctx;
struct service_info service;
- int integrity_active;
uint8_t rab_id;
} iu;
/* VLR number */
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
index 4c4e6ae86..a364dd76b 100644
--- a/openbsc/include/openbsc/iu.h
+++ b/openbsc/include/openbsc/iu.h
@@ -10,6 +10,7 @@ struct ue_conn_ctx {
struct llist_head list;
struct osmo_sua_link *link;
uint32_t conn_id;
+ int integrity_active;
};
enum iu_event_type {
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index ae0e200ce..2b8581be6 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -115,13 +115,12 @@ int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type, void *
rc = sgsn_ranap_rab_ass_resp(mm, (RANAP_RAB_SetupOrModifiedItemIEs_t *)data);
break;
case IU_EVENT_IU_RELEASE:
- mm->iu.integrity_active = 0;
/* Clean up ue_conn_ctx here */
LOGMMCTXP(LOGL_INFO, mm, "IU release\n");
break;
case IU_EVENT_SECURITY_MODE_COMPLETE:
/* Continue authentication here */
- mm->iu.integrity_active = 1;
+ mm->iu.ue_ctx->integrity_active = 1;
rc = gsm48_gmm_authorize(mm);
break;
default:
@@ -768,7 +767,7 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
}
/* The MS is authorized */
- if (ctx->ran_type == MM_CTX_T_UTRAN_Iu && !ctx->iu.integrity_active) {
+ if (ctx->ran_type == MM_CTX_T_UTRAN_Iu && !ctx->iu.ue_ctx->integrity_active) {
return iu_tx_sec_mode_cmd(ctx->iu.ue_ctx, &ctx->auth_triplet, 0);
}