Add error messages if a TBS cannot be decoded
This commit is contained in:
@@ -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
|
||||
we gracefully ignore that by returning 0. See:
|
||||
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;
|
||||
}
|
||||
/* Extract long BSR value */
|
||||
ce_ptr = &pduP[mac_subheader_len];
|
||||
NR_BSR_LONG *bsr_l = (NR_BSR_LONG *) ce_ptr;
|
||||
@@ -287,8 +289,10 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
|
||||
case UL_SCH_LCID_SRB1:
|
||||
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;
|
||||
}
|
||||
|
||||
rnti_t crnti = UE->rnti;
|
||||
NR_UE_info_t* UE_idx = UE;
|
||||
@@ -364,8 +368,10 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
|
||||
case UL_SCH_LCID_DTCH ... (UL_SCH_LCID_DTCH + 28):
|
||||
// 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;
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC, "[UE %04x] %d.%d : ULSCH -> UL-%s %d (gNB %ld, %d bytes)\n",
|
||||
UE->rnti,
|
||||
|
||||
Reference in New Issue
Block a user