gbproxy: Honour the BSS TLLI type when creating an SGSN TLLI
Currently gbproxy_make_sgsn_tlli always returns a foreign TLLI when it uses the (SGSN) P-TMSI to generate one. This patch changes the implementation to return a SGSN TLLI of the same type like the BSS TLLI in that case. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
e3b6a1143f
commit
233a847893
|
@ -254,9 +254,14 @@ uint32_t gbproxy_make_sgsn_tlli(struct gbproxy_peer *peer,
|
|||
int max_retries = 23;
|
||||
if (!peer->cfg->patch_ptmsi) {
|
||||
sgsn_tlli = bss_tlli;
|
||||
} else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI) {
|
||||
} else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI &&
|
||||
gprs_tlli_type(bss_tlli) == TLLI_FOREIGN) {
|
||||
sgsn_tlli = gprs_tmsi2tlli(link_info->sgsn_tlli.ptmsi,
|
||||
TLLI_FOREIGN);
|
||||
} else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI &&
|
||||
gprs_tlli_type(bss_tlli) == TLLI_LOCAL) {
|
||||
sgsn_tlli = gprs_tmsi2tlli(link_info->sgsn_tlli.ptmsi,
|
||||
TLLI_LOCAL);
|
||||
} else {
|
||||
do {
|
||||
/* create random TLLI, 0b01111xxx... */
|
||||
|
|
Loading…
Reference in New Issue