summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-03 11:35:50 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2016-02-04 15:52:19 +0100
commite5d68352ad6f881d116cda79bd5ac3a478fc2010 (patch)
tree42940afd9645616c52a0c3fd451003fd533d4669
parentba2ec4eee0ee6992d54899c754f3c24379b5d864 (diff)
gprs_gmm: Apply the auth hack only for UTRAN_Iu RAN type
Try to limit the effect 3G support has on the remaining code base. The sgsn test still fails, but at a later test.
-rw-r--r--openbsc/src/gprs/gprs_gmm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 87cc7cf46..03e1267a1 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -953,7 +953,14 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
reject_cause = GMM_CAUSE_MS_ID_NOT_DERIVED;
goto rejected;
}
+ /* Update MM Context with currient RA and Cell ID */
+ ctx->ra = ra_id;
+ if (ctx->ran_type == MM_CTX_T_GERAN_Gb)
+ ctx->gb.cell_id = cid;
+ else if (ctx->ran_type == MM_CTX_T_UTRAN_Iu)
{
+ //ctx->iu.sac = sac;
+ /* XXX: Hack to make 3G auth work with special SIM card */
ctx->auth_state = SGSN_AUTH_AUTHENTICATE;
/* Ki 000102030405060708090a0b0c0d0e0f */
ctx->auth_triplet = (struct gsm_auth_tuple ) {
@@ -963,12 +970,6 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
.kc = { 0xd9, 0xd9, 0xc2, 0xed, 0x62, 0x7d, 0x68, 0x00 },
};
}
- /* Update MM Context with currient RA and Cell ID */
- ctx->ra = ra_id;
- if (ctx->ran_type == MM_CTX_T_GERAN_Gb)
- ctx->gb.cell_id = cid;
- //else if (ctx->ran_type == MM_CTX_T_UTRAN_Iu)
- //ctx->iu.sac = sac;
/* Update MM Context with other data */
ctx->drx_parms = drx_par;