diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-07-24 16:36:45 +0700 |
---|---|---|
committer | fixeria <axilirator@gmail.com> | 2019-07-24 20:39:57 +0000 |
commit | aad87b66e8aa086443fe29b0367c619496a801e2 (patch) | |
tree | 5920e7647ec3feef820055978de9d406cbb4f4c9 | |
parent | ab8b01effdce38a19385e6a58e3b719a57710b02 (diff) |
gprs_bssgp_pcu_rx_dl_ud(): fix: BSSGP_IE_IMSI is optional
Change-Id: I940d220a399166122f33e67a222dd572085e1401
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index b34659b..3ea3e59 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -118,7 +118,11 @@ static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) /* read IMSI. if no IMSI exists, use first paging block (any paging), * because during attachment the IMSI might not be known, so the MS * will listen to all paging blocks. */ - gsm48_mi_to_string(imsi, sizeof(imsi), TLVP_VAL(tp, BSSGP_IE_IMSI), TLVP_LEN(tp, BSSGP_IE_IMSI)); + if (TLVP_PRESENT(tp, BSSGP_IE_IMSI)) + { + gsm48_mi_to_string(imsi, sizeof(imsi), TLVP_VAL(tp, BSSGP_IE_IMSI), + TLVP_LEN(tp, BSSGP_IE_IMSI)); + } #if 0 /* Do not rely on this IE. TODO: make this configurable */ /* parse ms radio access capability */ |