From 11b1ddee210058dd5c56cff2d5cdab252c85eb1c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 20 Apr 2019 22:37:14 +0200 Subject: ranap_msg_factory: Fix criticality of PDUs Seveal of our RANAP messages were using criticality values at the PDU level differing from what RANAP_PDU_Descriptions.asn states for the respective procedures. Let's fix that. This was discovered while working on the initial IuCS TTCN3 tests, where the receive templates require the criticality to match. Change-Id: I98eec0bdc0d0cb1b9284bd5d042b1f4403abef95 --- src/ranap_msg_factory.c | 10 +++++----- src/tests/test-ranap.ok | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index c287f02..2ae2dbf 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -150,7 +150,7 @@ struct msgb *ranap_new_msg_initial_ue(uint32_t conn_id, int is_ps, } msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_InitialUE_Message, - RANAP_Criticality_reject, + RANAP_Criticality_ignore, &asn_DEF_RANAP_InitialUE_Message, &out); @@ -192,7 +192,7 @@ struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int nas /* dt -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_DirectTransfer, - RANAP_Criticality_reject, + RANAP_Criticality_ignore, &asn_DEF_RANAP_DirectTransfer, &dt); @@ -467,7 +467,7 @@ struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, in /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Paging, - RANAP_Criticality_reject, + RANAP_Criticality_ignore, &asn_DEF_RANAP_Paging, &out); @@ -912,7 +912,7 @@ struct msgb *ranap_new_msg_iu_rel_req(const RANAP_Cause_t *cause) /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_ReleaseRequest, - RANAP_Criticality_reject, + RANAP_Criticality_ignore, &asn_DEF_RANAP_Iu_ReleaseRequest, &out); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_Iu_ReleaseRequest, &out); @@ -955,7 +955,7 @@ struct msgb *ranap_new_msg_rab_rel_req(uint8_t rab_id, const RANAP_Cause_t *caus /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_RAB_ReleaseRequest, - RANAP_Criticality_reject, + RANAP_Criticality_ignore, &asn_DEF_RANAP_RAB_ReleaseRequest, &out); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseRequest, &out); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 2a8de8f..a0ea521 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -23,7 +23,7 @@ Decoded Cause Misc=115 00 -00 14 00 10 00 00 02 00 10 40 04 03 aa bb cc 00 3b 40 01 00 +00 14 40 10 00 00 02 00 10 40 04 03 aa bb cc 00 3b 40 01 00 ==> SECURITY MODE COMMAND @@ -81,7 +81,7 @@ Decoded Cause Misc=115 00 01 23 45 67 -00 0e 00 1e 00 00 03 00 03 40 01 00 00 17 40 09 50 09 71 00 21 43 65 87 f9 00 40 40 05 00 01 23 45 67 +00 0e 40 1e 00 00 03 00 03 40 01 00 00 17 40 09 50 09 71 00 21 43 65 87 f9 00 40 40 05 00 01 23 45 67 ==> RAB ASSIGNMENT COMMAND (VOICE) @@ -194,7 +194,7 @@ Decoded Cause Misc=115 09 01 99 09 26 -00 13 00 36 00 00 06 00 03 40 01 00 00 0f 40 06 00 09 01 99 42 23 00 3a 40 08 00 09 01 99 42 23 42 23 00 10 40 04 03 aa bb cc 00 4f 40 03 00 00 17 00 56 40 05 09 01 99 09 26 +00 13 40 36 00 00 06 00 03 40 01 00 00 0f 40 06 00 09 01 99 42 23 00 3a 40 08 00 09 01 99 42 23 42 23 00 10 40 04 03 aa bb cc 00 4f 40 03 00 00 17 00 56 40 05 09 01 99 09 26 ==> IU RELEASE REQ @@ -202,7 +202,7 @@ Decoded Cause Misc=115 0B 40 -00 0b 00 09 00 00 01 00 04 40 02 0b 40 +00 0b 40 09 00 00 01 00 04 40 02 0b 40 ==> RAB RELEASE REQ @@ -215,7 +215,7 @@ Decoded Cause Misc=115 00 00 01 00 28 40 03 05 C2 D0 -00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 +00 0a 40 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 report talloc report on 'asn1_context' (total 0 bytes in 1 blocks) talloc report on 'msgb' (total 0 bytes in 1 blocks) -- cgit v1.2.3