aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs')
-rw-r--r--src/gprs/gb_proxy_patch.c12
-rw-r--r--src/gprs/gprs_gmm.c4
-rw-r--r--src/gprs/sgsn_libgtp.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/gprs/gb_proxy_patch.c b/src/gprs/gb_proxy_patch.c
index 48627550f..1be9c2451 100644
--- a/src/gprs/gb_proxy_patch.c
+++ b/src/gprs/gb_proxy_patch.c
@@ -32,7 +32,7 @@
extern void *tall_bsc_ctx;
/* patch RA identifier in place */
-static void gbproxy_patch_raid(uint8_t *raid_enc, struct gbproxy_peer *peer,
+static void gbproxy_patch_raid(struct gsm48_ra_id *raid_enc, struct gbproxy_peer *peer,
int to_bss, const char *log_text)
{
struct gbproxy_patch_state *state = &peer->patch_state;
@@ -47,7 +47,7 @@ static void gbproxy_patch_raid(uint8_t *raid_enc, struct gbproxy_peer *peer,
if (!state->local_mcc || !state->local_mnc)
return;
- gsm48_parse_ra(&raid, raid_enc);
+ gsm48_parse_ra(&raid, (uint8_t *)raid_enc);
old_mcc = raid.mcc;
old_mnc = raid.mnc;
@@ -76,7 +76,7 @@ static void gbproxy_patch_raid(uint8_t *raid_enc, struct gbproxy_peer *peer,
old_mcc, old_mnc, raid.lac, raid.rac,
raid.mcc, raid.mnc, raid.lac, raid.rac);
- gsm48_construct_ra(raid_enc, &raid);
+ gsm48_encode_ra(raid_enc, &raid);
rate_ctr_inc(&peer->ctrg->ctr[counter]);
}
@@ -233,14 +233,14 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len,
}
if (parse_ctx->raid_enc) {
- gbproxy_patch_raid(parse_ctx->raid_enc, peer, parse_ctx->to_bss,
+ gbproxy_patch_raid((struct gsm48_ra_id *)parse_ctx->raid_enc, peer, parse_ctx->to_bss,
parse_ctx->llc_msg_name);
have_patched = 1;
}
if (parse_ctx->old_raid_enc && !parse_ctx->old_raid_is_foreign) {
/* TODO: Patch to invalid if P-TMSI unknown. */
- gbproxy_patch_raid(parse_ctx->old_raid_enc, peer, parse_ctx->to_bss,
+ gbproxy_patch_raid((struct gsm48_ra_id *)parse_ctx->old_raid_enc, peer, parse_ctx->to_bss,
parse_ctx->llc_msg_name);
have_patched = 1;
}
@@ -286,7 +286,7 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
int err_ctr = -1;
if (parse_ctx->bssgp_raid_enc)
- gbproxy_patch_raid(parse_ctx->bssgp_raid_enc, peer,
+ gbproxy_patch_raid((struct gsm48_ra_id *)parse_ctx->bssgp_raid_enc, peer,
parse_ctx->to_bss, "BSSGP");
if (parse_ctx->need_decryption &&
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 77a553726..9313e989e 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -448,7 +448,7 @@ static int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm)
aa->att_result = 1; /* GPRS only */
aa->ra_upd_timer = gprs_secs_to_tmr_floor(sgsn->cfg.timers.T3312);
aa->radio_prio = 4; /* lowest */
- gsm48_construct_ra((uint8_t *)&aa->ra_id, &mm->ra);
+ gsm48_encode_ra(&aa->ra_id, &mm->ra);
#if 0
/* Optional: P-TMSI signature */
@@ -1505,7 +1505,7 @@ static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm)
rua->upd_result = 0; /* RA updated */
rua->ra_upd_timer = gprs_secs_to_tmr_floor(sgsn->cfg.timers.T3312);
- gsm48_construct_ra((uint8_t *)&rua->ra_id, &mm->ra);
+ gsm48_encode_ra(&rua->ra_id, &mm->ra);
#if 0
/* Optional: P-TMSI signature */
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 1032230ac..ae293f1dd 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -268,7 +268,7 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
raid = mmctx->ra;
raid.lac = 0xFFFE;
raid.rac = 0xFF;
- gsm48_construct_ra(pdp->rai.v, &raid);
+ gsm48_encode_ra((struct gsm48_ra_id *)pdp->rai.v, &raid);
/* Encode User Location Information accordint to TS 29.060 7.7.51 */
pdp->userloc_given = 1;