From c09cb29d78dce98cda15bcc92d3c32193336e0f0 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 21 Jan 2021 18:46:51 +0100 Subject: gbproxy: Fix radio status routing by TMSI If a radio status message contains a TMSI it should be routed as if it was a TLLI. Convert the TMSI to (foreign) TLLI so NRI-routing works. Both foreign and local TLLIs are routed the same. Fixes: OS#4954 Change-Id: Ifd64f02fa16b44f8e2e19eb8ba973f50a829ead5 --- src/gbproxy/gb_proxy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c index b573adc86..1dc3114b1 100644 --- a/src/gbproxy/gb_proxy.c +++ b/src/gbproxy/gb_proxy.c @@ -417,6 +417,8 @@ static int gbprox_rx_ptp_from_bss(struct gbproxy_nse *nse, struct msgb *msg, uin } else if (TLVP_PRESENT(&tp, BSSGP_IE_TMSI)) { /* we treat the TMSI like a TLLI and extract the NRI from it */ tlli = osmo_load32be(TLVP_VAL(&tp, BSSGP_IE_TMSI)); + /* Convert the TMSI into a FOREIGN TLLI so it is routed appropriately */ + tlli = gprs_tmsi2tlli(tlli, TLLI_FOREIGN); rc = gbprox_bss2sgsn_tlli(bss_bvc->cell, msg, &tlli, false); } else if (TLVP_PRESENT(&tp, BSSGP_IE_IMSI)) { /* FIXME: Use the IMSI as selector? */ -- cgit v1.2.3