diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-29 14:32:58 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-29 14:33:25 +0200 |
commit | e9b0d7488fb3c240fe7ac045b958b455ba54a969 (patch) | |
tree | 5c7351412e0a1df6a249be6cb8c6b58fdf2ed305 | |
parent | 393158ac0844cdd835c807c51fab18c48fa5ef63 (diff) |
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
-rw-r--r-- | src/host/trxcon/trx_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index e1ce5881..716fd23c 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -585,7 +585,7 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) 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; |