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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: sysinfo: Fix regression causing missing L2 Pseudo-Length in SI5/SI6
......................................................................
sysinfo: Fix regression causing missing L2 Pseudo-Length in SI5/SI6
Fixes a regression in the code generating SI5* and SI6 on SACCH,
where the L2 pseudo-length is not part of the 'struct' definition
we have in gsm_04_08.h and hence has to be encoded manually into
the first byte of the SI buffer.
We were doing this correctly until April 2017, when the following
patch was merged:
> commit 6f0e50c8337355eb59033903ede9ab6528890835
> Author: Max <msuraev at sysmocom.de>
> Date: Wed Apr 12 15:30:54 2017 +0200
>
> Prepare for extended SI2quater support
This patch cacidentially overwrote the l2_plen that was just enoded,
as the 'struct' was no longer pointing to 'output' (si_buf+1), but
now directly to the start of the si_buf.
NOTE: The Wireshark RSL dissector (and more recently also LAPDm)
contain a similar bug, so the SACCH will not be decoded correctly
after applying this patch. Nevertheless, it's correct.
back-port of OsmoBSC Change-Id: Ie8c907b1317566670aeb68f933ceefd552c17565
Closes: #3059
Related: #2963
Change-Id: Iaf5feefc1bb3194dd491955fee418795c61787f7
---
M openbsc/src/libbsc/system_information.c
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Vadim Yanitskiy: Looks good to me, but someone else must approve
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index a878b52..9d40a24 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -933,7 +933,7 @@
break;
}
- si5 = (struct gsm48_system_information_type_5 *) GSM_BTS_SI(bts, t);
+ si5 = (struct gsm48_system_information_type_5 *) output;
/* l2 pseudo length, not part of msg: 18 */
si5->rr_protocol_discriminator = GSM48_PDISC_RR;
@@ -969,7 +969,7 @@
break;
}
- si5b = (struct gsm48_system_information_type_5bis *) GSM_BTS_SI(bts, t);
+ si5b = (struct gsm48_system_information_type_5bis *) output;
/* l2 pseudo length, not part of msg: 18 */
si5b->rr_protocol_discriminator = GSM48_PDISC_RR;
@@ -983,7 +983,7 @@
if (n) {
/* indicate in SI5 and SI5bis: there is an extension */
struct gsm48_system_information_type_5 *si5 =
- (struct gsm48_system_information_type_5 *) GSM_BTS_SI(bts, SYSINFO_TYPE_5);
+ (struct gsm48_system_information_type_5 *) GSM_BTS_SI(bts, SYSINFO_TYPE_5)+1;
si5->bcch_frequency_list[0] |= 0x20;
si5b->bcch_frequency_list[0] |= 0x20;
} else
@@ -1013,7 +1013,7 @@
break;
}
- si5t = (struct gsm48_system_information_type_5ter *) GSM_BTS_SI(bts, t);
+ si5t = (struct gsm48_system_information_type_5ter *) output;
/* l2 pseudo length, not part of msg: 18 */
si5t->rr_protocol_discriminator = GSM48_PDISC_RR;
@@ -1051,7 +1051,7 @@
break;
}
- si6 = (struct gsm48_system_information_type_6 *) GSM_BTS_SI(bts, t);
+ si6 = (struct gsm48_system_information_type_6 *) output;
/* l2 pseudo length, not part of msg: 11 */
si6->rr_protocol_discriminator = GSM48_PDISC_RR;
--
To view, visit https://gerrit.osmocom.org/7226
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf5feefc1bb3194dd491955fee418795c61787f7
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>