Change in osmo-pcu[master]: Don't check ul_control_block before decoding into it.

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/.

keith gerrit-no-reply at lists.osmocom.org
Thu Mar 26 21:36:01 UTC 2020


keith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17634 )


Change subject: Don't check ul_control_block before decoding into it.
......................................................................

Don't check ul_control_block before decoding into it.

This patch corrects an error introduced in
6fd8ffb6fe62586a6880780678cbee3d9f97e763
That commit allowed us to send the data over GSMTAP even
if the Uplink Control Block had invalid content,
that is to say, if decode_gsm_rlcmac_uplink() returned error.

However the check for ul_control_block->u.MESSAGE_TYPE
was place before decode_gsm_rlcmac_uplink()

Change-Id: Ic47602e5c6a13571b92c0a939fc3514110b82444
---
M src/pdch.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/17634/1

diff --git a/src/pdch.cpp b/src/pdch.cpp
index 8560cb4..f3853c2 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -706,12 +706,12 @@
 
 	LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++\n");
 
+	rc = decode_gsm_rlcmac_uplink(rlc_block, ul_control_block);
 	if (ul_control_block->u.MESSAGE_TYPE == MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK)
 		bts()->send_gsmtap(PCU_GSMTAP_C_UL_DUMMY, true, trx_no(), ts_no, GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 	else
 		bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-	rc = decode_gsm_rlcmac_uplink(rlc_block, ul_control_block);
 	if(rc < 0) {
 		LOGP(DRLCMACUL, LOGL_ERROR, "Dropping Uplink Control Block with invalid "
 		     "content, decode failed: %d)\n", rc);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17634
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic47602e5c6a13571b92c0a939fc3514110b82444
Gerrit-Change-Number: 17634
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200326/44cd79eb/attachment.htm>


More information about the gerrit-log mailing list