Bug #4381
closedosmo-pcu: decode_gsm_rlcmac_uplink() has all return codes from csnStreamDecoder() disabled
100%
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.
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.
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
Updated by pespin about 4 years ago
- Status changed from Feedback to Resolved
- % Done changed from 90 to 100
Merged, closing.