pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/31732 )
Change subject: rlcmac: Ignore DATA.ind with len=0
......................................................................
rlcmac: Ignore DATA.ind with len=0
Change-Id: I342c7999261832a5d981e5831e428d2cbd82729e
---
M src/rlcmac/rlcmac_prim.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/32/31732/1
diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c
index dcf4424..3b5f003 100644
--- a/src/rlcmac/rlcmac_prim.c
+++ b/src/rlcmac/rlcmac_prim.c
@@ -467,8 +467,15 @@
static int rlcmac_prim_handle_l1ctl_pdch_data_ind(struct osmo_gprs_rlcmac_prim
*rlcmac_prim)
{
- enum gprs_rlcmac_coding_scheme cs =
gprs_rlcmac_mcs_get_by_size_dl(rlcmac_prim->l1ctl.pdch_data_ind.data_len);
+ enum gprs_rlcmac_coding_scheme cs;
+ /* ignore empty DATA.ind */
+ if (rlcmac_prim->l1ctl.pdch_data_ind.data_len == 0) {
+ LOGRLCMAC(LOGL_DEBUG, "Dropping DL data block with length 0\n");
+ return 0;
+ }
+
+ cs = gprs_rlcmac_mcs_get_by_size_dl(rlcmac_prim->l1ctl.pdch_data_ind.data_len);
if (cs == GPRS_RLCMAC_CS_UNKNOWN) {
LOGRLCMAC(LOGL_ERROR, "Dropping DL data block with invalid length %u: %s\n",
rlcmac_prim->l1ctl.pdch_data_ind.data_len,
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/31732
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I342c7999261832a5d981e5831e428d2cbd82729e
Gerrit-Change-Number: 31732
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange