IuPS: send Security Mode Command, track the new_key flag.
Change-Id: I0b2593c2df13b79eb36975b0d302e31cfdf8bb09
This commit is contained in:
parent
770f3e32e0
commit
3ecfbbba6f
|
@ -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:
|
||||
|
|
|
@ -244,6 +244,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx)
|
|||
|
||||
ctx->ran_type = MM_CTX_T_UTRAN_Iu;
|
||||
ctx->iu.ue_ctx = uectx;
|
||||
ctx->iu.new_key = 1;
|
||||
ctx->mm_state = GMM_DEREGISTERED;
|
||||
ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL;
|
||||
ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0);
|
||||
|
|
Loading…
Reference in New Issue