aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-03 11:35:50 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:10 +0100
commit92223cc32e55b884fdf36afc4fb82c1bd227041b (patch)
treed1e13c848bb02dc4b32071b2d34d427b10739487 /openbsc/src/gprs
parent2f5cc8abe0f48b56fbcdb03b8b9767247cdc2b3a (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.
Diffstat (limited to 'openbsc/src/gprs')
-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 34527a542..171b34bbb 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -954,7 +954,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 ) {
@@ -964,12 +971,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;