diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-05-29 11:10:57 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-08-25 09:34:51 +0000 |
commit | 8876a507ff46c4caf8cb4f99df121f1188db01ef (patch) | |
tree | 13e33145bbb6d461d002d9caf383dc7da28454a8 | |
parent | aa11997480822af0a583ac3c7c3fca1dc4bbe994 (diff) |
osmo-bts-trx: Relax validation to allow TRX data bursts without padding
Original OpenBTS transcievers add 2 bytes of padding to the end of data
bursts, having in total 158 bytes. As those two extra bytes are being
ignored after the initial validation, let's relax this validation a bit
in order to accept transcievers that decide no to send these two extra
bytes.
Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 86a3b9be..a41cf2cf 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -443,7 +443,8 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) return len; } else if (len == EGPRS_BURST_LEN + 10) { burst_len = EGPRS_BURST_LEN; - } else if (len != GSM_BURST_LEN + 10) { + /* Accept bursts ending with 2 bytes of padding (OpenBTS compatible trx) or without them: */ + } else if (len != GSM_BURST_LEN + 10 && len != GSM_BURST_LEN + 8) { LOGP(DTRX, LOGL_NOTICE, "Got data message with invalid lenght " "'%d'\n", len); return -EINVAL; |