aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-02-14 11:17:58 +0100
committerMichael McTernan <mike.mcternan@wavemobile.com>2016-04-20 15:14:40 +0100
commit7ba36edc4734cfc44751e6d2568b58d32454a2ac (patch)
treedd0d7ededbca97e96cc285ac2c8a3878f53757de
parent547151fe2cef2c358aeb309076b09e55da1d6e36 (diff)
Correctly fill system information messages from BSCmmcternan/bb_maint
SI 5*/6 require L2 header of 0x03,0x03. All SI might be less than 23 octets, so they need to be filled with 0x2b.
-rw-r--r--src/common/rsl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 5a2befd..b43f35d 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -318,6 +318,7 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
if (len > sizeof(sysinfo_buf_t))
len = sizeof(sysinfo_buf_t);
bts->si_valid |= (1 << osmo_si);
+ memset(bts->si_buf[osmo_si], 0x2b, sizeof(sysinfo_buf_t));
memcpy(bts->si_buf[osmo_si],
TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len);
LOGP(DRSL, LOGL_INFO, " Rx RSL BCCH INFO (SI%s)\n",
@@ -327,6 +328,7 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
if (len > sizeof(sysinfo_buf_t))
len = sizeof(sysinfo_buf_t);
bts->si_valid |= (1 << osmo_si);
+ memset(bts->si_buf[osmo_si], 0x2b, sizeof(sysinfo_buf_t));
memcpy(bts->si_buf[osmo_si],
TLVP_VAL(&tp, RSL_IE_L3_INFO), len);
LOGP(DRSL, LOGL_INFO, " Rx RSL BCCH INFO (SI%s)\n",
@@ -441,6 +443,7 @@ static int rsl_rx_sacch_fill(struct gsm_bts_trx *trx, struct msgb *msg)
bts->si_valid |= (1 << osmo_si);
bts->si_buf[osmo_si][0] = 0x03; /* C/R + EA */
bts->si_buf[osmo_si][1] = 0x03; /* UI frame */
+ memset(bts->si_buf[osmo_si]+2, 0x2b, sizeof(sysinfo_buf_t)-2);
memcpy(bts->si_buf[osmo_si]+2,
TLVP_VAL(&tp, RSL_IE_L3_INFO), len);
LOGP(DRSL, LOGL_INFO, " Rx RSL SACCH FILLING (SI%s)\n",
@@ -793,8 +796,9 @@ static int rsl_rx_chan_activ(struct msgb *msg)
if (copy_len > sizeof(sysinfo_buf_t)-2)
copy_len = sizeof(sysinfo_buf_t)-2;
lchan->si.valid |= (1 << osmo_si);
- lchan->si.buf[osmo_si][0] = 0x00;
+ lchan->si.buf[osmo_si][0] = 0x03;
lchan->si.buf[osmo_si][1] = 0x03;
+ memset(lchan->si.buf[osmo_si]+2, 0x2b, sizeof(sysinfo_buf_t)-2);
memcpy(lchan->si.buf[osmo_si]+2, cur, copy_len);
cur += si_len;
@@ -1143,8 +1147,9 @@ static int rsl_rx_sacch_inf_mod(struct msgb *msg)
if (len > sizeof(sysinfo_buf_t)-2)
len = sizeof(sysinfo_buf_t)-2;
lchan->si.valid |= (1 << osmo_si);
- lchan->si.buf[osmo_si][0] = 0x00;
+ lchan->si.buf[osmo_si][0] = 0x03;
lchan->si.buf[osmo_si][1] = 0x03;
+ memset(lchan->si.buf[osmo_si]+2, 0x2b, sizeof(sysinfo_buf_t)-2);
memcpy(lchan->si.buf[osmo_si]+2,
TLVP_VAL(&tp, RSL_IE_L3_INFO), len);
LOGP(DRSL, LOGL_INFO, "%s Rx RSL SACCH FILLING (SI%s)\n",