Project

General

Profile

Actions

Bug #4381

closed

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

Added by pespin about 4 years ago. Updated about 4 years ago.

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

100%

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.

Actions #1

Updated by pespin about 4 years 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.

Actions #2

Updated by pespin about 4 years ago

Same fixes are needed too for decode_gsm_rlcmac_downlink().

Actions #3

Updated by pespin about 4 years 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

Actions #4

Updated by pespin about 4 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100

Merged, closing.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)