Compare commits

...

2 Commits

Author SHA1 Message Date
Neels Hofmeyr
af6ba27c2a gsup: send RAT type on LU
Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274
2019-12-26 16:56:14 +01:00
Neels Hofmeyr
dc5b02674f fix nullpointer: in gsm48_rx_gmm_ra_upd_req()
Change-Id: Ifde15dc4151d84748f0e67b32c9c260cb2d9d8fc
2019-12-25 23:46:06 +01:00
2 changed files with 17 additions and 3 deletions

View File

@@ -1642,7 +1642,7 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]);
/* Update the MM context with the new RA-ID */
if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) {
if (mmctx->ran_type == MM_CTX_T_GERAN_Gb && msgb_bcid(msg)) {
bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg));
/* Update the MM context with the new (i.e. foreign) TLLI */
mmctx->gb.tlli = msgb_tlli(msg);

View File

@@ -812,7 +812,7 @@ static int gprs_subscr_query_auth_info(struct gprs_subscr *subscr,
return gprs_subscr_tx_gsup_message(subscr, &gsup_msg);
}
int gprs_subscr_location_update(struct gprs_subscr *subscr)
int gprs_subscr_location_update(struct gprs_subscr *subscr, enum sgsn_ran_type ran_type)
{
struct osmo_gsup_message gsup_msg = {0};
@@ -820,6 +820,20 @@ int gprs_subscr_location_update(struct gprs_subscr *subscr)
"subscriber data is not available\n");
gsup_msg.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST;
switch (ran_type) {
case MM_CTX_T_GERAN_Gb:
gsup_msg.supported_rat_types[0] = OSMO_RAT_GERAN_A;
gsup_msg.supported_rat_types_len = 1;
break;
case MM_CTX_T_UTRAN_Iu:
gsup_msg.supported_rat_types[0] = OSMO_RAT_UTRAN_IU;
gsup_msg.supported_rat_types_len = 1;
break;
default:
break;
}
return gprs_subscr_tx_gsup_message(subscr, &gsup_msg);
}
@@ -884,7 +898,7 @@ int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx)
subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING;
rc = gprs_subscr_location_update(subscr);
rc = gprs_subscr_location_update(subscr, mmctx->ran_type);
gprs_subscr_put(subscr);
return rc;
}