aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2019-06-17 12:13:28 +0200
committerEric Wild <ewild@sysmocom.de>2019-06-17 13:50:13 +0200
commitdf9b39142f566937fc191caaaf655f7b1cae8210 (patch)
tree5279b1b5705cf12815c0ec635b25bd0bd4b258b6
parentd1463bc36574627c6315ab2f7346f897387b1345 (diff)
replace magic tmsi constant with define
-rw-r--r--src/gprs/gb_proxy.c2
-rw-r--r--src/gprs/gprs_sgsn.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index 3da7bfdbb..3f471ff82 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -243,7 +243,7 @@ uint32_t gbproxy_make_bss_ptmsi(struct gbproxy_peer *peer,
break;
}
- bss_ptmsi = bss_ptmsi | 0xC0000000;
+ bss_ptmsi = bss_ptmsi | GSM23003_TMSI_SGSN_MASK;
if (gbproxy_link_info_by_ptmsi(peer, bss_ptmsi))
bss_ptmsi = GSM_RESERVED_TMSI;
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 58011078d..8d3de7b53 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -692,12 +692,12 @@ restart:
* Alternatively, a freeze list could be used if another PRNG is used
* or when this approach proves to be not sufficient.
*/
- if (ptmsi >= 0xC0000000) {
+ if (ptmsi >= GSM23003_TMSI_SGSN_MASK) {
if (!max_retries--)
goto failed;
goto restart;
}
- ptmsi |= 0xC0000000;
+ ptmsi |= GSM23003_TMSI_SGSN_MASK;
if (ptmsi == GSM_RESERVED_TMSI) {
if (!max_retries--)