aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2021-01-21 18:46:51 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2021-01-22 12:42:14 +0100
commitc09cb29d78dce98cda15bcc92d3c32193336e0f0 (patch)
treed586c22ed48f8f893ab01c7d2ac3d07ae9bd4caf /src
parent6ad4040f55b7c79abeaf527e61ef53f39e990076 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/gbproxy/gb_proxy.c2
1 files changed, 2 insertions, 0 deletions
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? */