sgsn: Give the IMEI to the GGSN for analysis

Most SGSNs pass the IMEI(SV). We currently only enquire about
the IMEI and then pad the 'SV' with 1111b (thanks to the encoding
routine). Sadly it insists on always writing the length which
means we have to memmove the data around by a single octet.

Manually verified using the pcu-emu and looking at the trace
using wireshark.
This commit is contained in:
Holger Hans Peter Freyther 2015-05-12 22:20:05 +02:00
parent 6ddb6ac028
commit d6900dfba4
1 changed files with 6 additions and 0 deletions

View File

@ -237,6 +237,12 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
pdp->userloc.v[0] = 0; /* CGI for GERAN */
bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->cell_id);
/* include the IMEI(SV) */
pdp->imeisv_given = 1;
gsm48_encode_bcd_number(&pdp->imeisv.v[0], 8, 0, mmctx->imei);
pdp->imeisv.l = pdp->imeisv.v[0];
memmove(&pdp->imeisv.v[0], &pdp->imeisv.v[1], 8);
/* change pdp state to 'requested' */
pctx->state = PDP_STATE_CR_REQ;