osmo-bts[master]: RSL: receive and send multiple SI2q messages

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Jun 26 10:32:06 UTC 2017


Patch Set 2:

This seems to be the diff with the original commits which were reverted [end of comment].
If I understand correctly after looking at the diff, it seems the issue was there because bts->si_buf[osmo_si] was not memset in case SYSINFO_TYPE_2quater == osmo_si was true?

I still think you should explain in the commit description the issue details and what does this new version exactly do to fix the issue, because it's difficult to see with a plain diff because it was reverted.

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 187a2e7..fa49071 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -292,9 +292,21 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
                        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, %u bytes)\n",
+                    get_value_string(osmo_sitype_strs, osmo_si), len);
+
+               if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 &&
+                   num_agch(trx, "RSL") != 1) {
+                       lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
+                       /* will be reactivated by sapi_deactivate_cb() */
+                       trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind =
+                               LCHAN_REL_ACT_REACT;
+               }

-               switch (osmo_si) {
-               case SYSINFO_TYPE_2quater:
+               if (SYSINFO_TYPE_2quater == osmo_si) {
                        si2q = (struct gsm48_system_information_type_2quater *) TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO);
                        bv.data = si2q->rest_octets;
                        bv.data_len = GSM_MACBLOCK_LEN;
@@ -323,18 +335,6 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)

                        memset(GSM_BTS_SI2Q(bts, bts->si2q_index), GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t));
                        memcpy(GSM_BTS_SI2Q(bts, bts->si2q_index), TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len);
-                       break;
-               case SYSINFO_TYPE_3:
-                       if (trx->nr == 0 && num_agch(trx, "RSL") != 1) {
-                               lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
-                               /* will be reactivated by sapi_deactivate_cb() */
-                               trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_REACT;
-                       } /* intentional fall-through to copy SI3 data */
-               default:
-                       memset(bts->si_buf[osmo_si], GSM_MACBLOCK_PADDING, 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, %u bytes)\n",
-                            get_value_string(osmo_sitype_strs, osmo_si), len);
                }

-- 
To view, visit https://gerrit.osmocom.org/3047
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib595733cde108387bc7ee76b1b11ada6a235f13c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-HasComments: No



More information about the gerrit-log mailing list