diff options
author | Eric Wild <ewild@sysmocom.de> | 2019-06-14 16:11:08 +0200 |
---|---|---|
committer | Hoernchen <ewild@sysmocom.de> | 2019-06-17 12:51:27 +0000 |
commit | 58abc67caaf8889d637fe2e6f3feb132e89c87f2 (patch) | |
tree | 146e7e13d108211f9e5d0f6d7bb68304684dd3b7 | |
parent | 01926fc240a9ce9c32991a4c1d8b3d71888c91bc (diff) |
libvlr: fix sgsn tmsi creation, replace constant with define
reported by _dev_zero in #osmocom
Change-Id: Ib5679ab5d06b6ef735725b4a68eeb1e9cbcc11ba
Depends-On: libosmocore I52b9f6b5f3e96d85a390ba2af21d7814df8aaeec
-rw-r--r-- | src/libvlr/vlr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 2753096e9..5610cfb53 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -336,11 +336,11 @@ int vlr_subscr_alloc_tmsi(struct vlr_subscr *vsub) /* Section 2.4 of 23.003: MSC has two MSB 00/01/10, SGSN 11 */ if (vlr->cfg.is_ps) { /* SGSN */ - tmsi |= 0xC000000; + tmsi |= GSM23003_TMSI_SGSN_MASK; } else { /* MSC */ - if ((tmsi & 0xC0000000) == 0xC0000000) - tmsi &= ~0xC0000000; + if ((tmsi & GSM23003_TMSI_SGSN_MASK) == GSM23003_TMSI_SGSN_MASK) + tmsi &= ~GSM23003_TMSI_SGSN_MASK; } /* If this TMSI is already in use, try another one. */ |