Commit 9155befa authored by Robert Schmidt's avatar Robert Schmidt

Add error messages if a TBS cannot be decoded

parent 1c7576bd
...@@ -179,8 +179,10 @@ int nr_process_mac_pdu(instance_t module_idP, ...@@ -179,8 +179,10 @@ int nr_process_mac_pdu(instance_t module_idP,
to be a partial PDU at the end of this buffer, so here to be a partial PDU at the end of this buffer, so here
we gracefully ignore that by returning 0. See: we gracefully ignore that by returning 0. See:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/534 */ https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/534 */
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) {
LOG_E(NR_MAC, "pdu_len %d is invalid (shorter than MAC PDU header)\n", pdu_len);
return 0; return 0;
}
/* Extract long BSR value */ /* Extract long BSR value */
ce_ptr = &pduP[mac_subheader_len]; ce_ptr = &pduP[mac_subheader_len];
NR_BSR_LONG *bsr_l = (NR_BSR_LONG *) ce_ptr; NR_BSR_LONG *bsr_l = (NR_BSR_LONG *) ce_ptr;
...@@ -287,8 +289,10 @@ int nr_process_mac_pdu(instance_t module_idP, ...@@ -287,8 +289,10 @@ int nr_process_mac_pdu(instance_t module_idP,
case UL_SCH_LCID_SRB1: case UL_SCH_LCID_SRB1:
case UL_SCH_LCID_SRB2: case UL_SCH_LCID_SRB2:
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) {
LOG_E(NR_MAC, "pdu_len %d is invalid (shorter than MAC PDU header)\n", pdu_len);
return 0; return 0;
}
rnti_t crnti = UE->rnti; rnti_t crnti = UE->rnti;
NR_UE_info_t* UE_idx = UE; NR_UE_info_t* UE_idx = UE;
...@@ -364,8 +368,10 @@ int nr_process_mac_pdu(instance_t module_idP, ...@@ -364,8 +368,10 @@ int nr_process_mac_pdu(instance_t module_idP,
case UL_SCH_LCID_DTCH ... (UL_SCH_LCID_DTCH + 28): case UL_SCH_LCID_DTCH ... (UL_SCH_LCID_DTCH + 28):
// check if LCID is valid at current time. // check if LCID is valid at current time.
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len)) {
LOG_E(NR_MAC, "pdu_len %d is invalid (shorter than MAC PDU header)\n", pdu_len);
return 0; return 0;
}
LOG_D(NR_MAC, "[UE %04x] %d.%d : ULSCH -> UL-%s %d (gNB %ld, %d bytes)\n", LOG_D(NR_MAC, "[UE %04x] %d.%d : ULSCH -> UL-%s %d (gNB %ld, %d bytes)\n",
UE->rnti, UE->rnti,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment