Change in osmocom-bb[master]: trxcon: fix legacy length expectations for TRXDv0 Rx PDUs

fixeria gerrit-no-reply at lists.osmocom.org
Thu Apr 29 12:35:13 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/23972 )


Change subject: trxcon: fix legacy length expectations for TRXDv0 Rx PDUs
......................................................................

trxcon: fix legacy length expectations for TRXDv0 Rx PDUs

158 is basically: 8 + 148 + 2, where the last two are padding bytes
sent by legacy TRXDv0 transceivers.  We don't need them, so do not
drop PDUs without these leggacy padding bytes.

Change-Id: I6c0734bc4669ccde2a93940c9cf50fdbbd67cb00
---
M src/host/trxcon/trx_if.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/23972/1

diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index e1ce588..716fd23 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -585,7 +585,7 @@
 		return read_len;
 	}
 
-	if (read_len != 158) {
+	if (read_len < (8 + 148)) { /* TRXDv0 header + GMSK burst */
 		LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid "
 			"length '%zd'\n", read_len);
 		return -EINVAL;

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I6c0734bc4669ccde2a93940c9cf50fdbbd67cb00
Gerrit-Change-Number: 23972
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210429/89aaf16c/attachment.htm>


More information about the gerrit-log mailing list