Project

General

Profile

Bug #4381

osmo-pcu: decode_gsm_rlcmac_uplink() has all return codes from csnStreamDecoder() disabled

Added by pespin 27 days ago. Updated 21 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/28/2020
Due date:
% Done:

90%

Spec Reference:

Description

For instance:

    case MT_PACKET_CONTROL_ACK:
    {
      /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement);
      break;
    }

This function AFAIR returns 0 on success and negative on error. We should return an error and fail in decode_gsm_rlcmac_uplink() (which now returns void...). If decode_gsm_rlcmac_uplink() fails, then probably drop the packet instead of assuming the decoded content is correct.

History

#1 Updated by pespin 27 days ago

It seems all those "ret" commented out come from wireshark.git c67363e4def37f263d4727d757ef715e2c38ad76, where the dissect_gsm_rlcmac_downlink() function is expected to return void, and the compiler was warning that the variable was set but not used.

#2 Updated by pespin 27 days ago

Same fixes are needed too for decode_gsm_rlcmac_downlink().

#3 Updated by pespin 21 days ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

Should be fixed by:

remote: https://gerrit.osmocom.org/c/osmo-pcu/+/17084 csn1.cpp: Rework ProcessError() function to print errors
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/17085 rlcmac: Return error code from csn1 encoder/decoder
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/17086 Check return code of rlcmac decode/encode functions
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/17087 rlcmac: Transform a few LOGPC messages to LOGP
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/17088 Fix trailing newline mess with LOGP in rlcmac/csn1

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)