Change in osmo-bts[master]: osmo-bts-trx: move TDMA frame number check to trx_data_read_cb()

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

laforge gerrit-no-reply at lists.osmocom.org
Sat Apr 24 08:47:03 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/23830 )

Change subject: osmo-bts-trx: move TDMA frame number check to trx_data_read_cb()
......................................................................

osmo-bts-trx: move TDMA frame number check to trx_data_read_cb()

Change-Id: Ib3c4a5ad7f16196dc5c591aa0b4d7e0ec3267f05
Related: SYS#4895, OS#4941, OS#4006
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 7 insertions(+), 6 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 5ce1889..5d18c2c 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -743,12 +743,6 @@
 	bi->rssi = -(int8_t)buf[5];
 	bi->toa256 = (int16_t) osmo_load16be(buf + 6);
 
-	if (bi->fn >= GSM_TDMA_HYPERFRAME) {
-		LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR,
-			"Illegal TDMA fn=%u\n", bi->fn);
-		return -EINVAL;
-	}
-
 	return TRX_UL_V0HDR_LEN;
 }
 
@@ -974,6 +968,13 @@
 	if (hdr_len < 0)
 		return hdr_len;
 
+	if (bi.fn >= GSM_TDMA_HYPERFRAME) {
+		LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR,
+			"Rx malformed TRXDv%u PDU: illegal TDMA fn=%u\n",
+			pdu_ver, bi.fn);
+		return -EINVAL;
+	}
+
 	if (bi.flags & TRX_BI_F_NOPE_IND) {
 		bi.burst_len = 0;
 		goto skip_burst;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib3c4a5ad7f16196dc5c591aa0b4d7e0ec3267f05
Gerrit-Change-Number: 23830
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210424/055e12ce/attachment.htm>


More information about the gerrit-log mailing list