aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-09-30 09:22:30 +0800
committerHarald Welte <laforge@gnumonks.org>2017-10-01 11:26:28 +0800
commitaa70d9d828a8163b8cf40c86de11694afeb05f65 (patch)
treebbc5143c0c2454c8d1c82852019e21354a37d7a5 /src
parentd6a52e993d428b47cf6e8d3280b787e07dc9b855 (diff)
Make sure BA-IND in all SI2xxx is '0' and in all SI5xxx is '1'
In masurement reports sent by the MS, this can then be used to correlate if a given measurement report was in response to a BCCH/neighbor list received on BCCH (SI2xxx) or on dowlink SACCH (SI5xxx). Closes: OS#2525 Change-Id: I1cd0dc51026dcd0e508e63eea4e333e6b184787a
Diffstat (limited to 'src')
-rw-r--r--src/libbsc/rest_octets.c8
-rw-r--r--src/libbsc/system_information.c16
2 files changed, 21 insertions, 3 deletions
diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c
index 866734b6f..09c4a9014 100644
--- a/src/libbsc/rest_octets.c
+++ b/src/libbsc/rest_octets.c
@@ -361,8 +361,12 @@ int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts)
bv.data_len = 20;
bitvec_zero(&bv);
- /* BA_IND */
- bitvec_set_bit(&bv, 1);
+ /* BA_IND: Set to '0' as that's what we use for SI2xxx type,
+ * whereas '1' is used for SI5xxx type messages. The point here
+ * is to be able to correlate whether a given MS measurement
+ * report was using the neighbor cells advertised in SI2 or in
+ * SI5, as those two could very well be different */
+ bitvec_set_bit(&bv, 0);
/* 3G_BA_IND */
bitvec_set_bit(&bv, 1);
/* MP_CHANGE_MARK */
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 65b9ccc4f..7bdb80a00 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -588,6 +588,7 @@ static int generate_bcch_chan_list(uint8_t *chan_list, struct gsm_bts *bts,
{
struct gsm_bts *cur_bts;
struct bitvec *bv;
+ int rc;
if (si5 && bts->neigh_list_manual_mode == NL_MODE_MANUAL_SI5SEP)
bv = &bts->si_common.si5_neigh_list;
@@ -608,7 +609,20 @@ static int generate_bcch_chan_list(uint8_t *chan_list, struct gsm_bts *bts,
}
/* then we generate a GSM 04.08 frequency list from the bitvec */
- return bitvec2freq_list(chan_list, bv, bts, bis, ter);
+ rc = bitvec2freq_list(chan_list, bv, bts, bis, ter);
+ if (rc < 0)
+ return rc;
+
+ /* Set BA-IND depending on whether we're generating SI2 or SI5.
+ * The point here is to be able to correlate whether a given MS
+ * measurement report was using the neighbor cells advertised in
+ * SI2 or in SI5, as those two could very well be different */
+ if (si5)
+ chan_list[0] |= 0x10;
+ else
+ chan_list[0] &= ~0x10;
+
+ return rc;
}
static int list_arfcn(uint8_t *chan_list, uint8_t mask, char *text)