Change in ...osmo-ttcn3-hacks[master]: library/GSM_RR_Types.ttcn: fix: apply '2B'O padding to GsmRrMessage

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Sep 10 00:50:16 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15456 )

Change subject: library/GSM_RR_Types.ttcn: fix: apply '2B'O padding to GsmRrMessage
......................................................................

library/GSM_RR_Types.ttcn: fix: apply '2B'O padding to GsmRrMessage

For some reason TITAN starts padding not from the beginning of
record ImmediateAssignment, but from it's wrapper GsmRrMessage.
As a result, dec_GsmRrMessage() warns about undecoded octets:

  Data remained at the end of the stream after successful decoding '2B2B2B'O

Similarly enc_GsmRrMessage() generates a shorter payload. Let's
work this around by applying PADDING attribute to GsmRrMessage.

Change-Id: I5fe327383402956213c20a68b18b8a48381156b5
---
M library/GSM_RR_Types.ttcn
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 49ceae3..b090d25 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -590,8 +590,7 @@
 		/* TODO: starting time TLV */
 		IaRestOctets			rest_octets
 	} with { variant (chan_desc) "PRESENCE(ded_or_tbf.tbf = false)"
-		 variant (pkt_chan_desc) "PRESENCE(ded_or_tbf.tbf = true)"
-		 variant "PADDING(168), PADDING_PATTERN('00101011'B)" };
+		 variant (pkt_chan_desc) "PRESENCE(ded_or_tbf.tbf = true)" };
 
 	/* 9.1.20 */
 	type record ReqRefWaitInd {
@@ -683,7 +682,10 @@
 				pag_req_2, header.message_type = PAGING_REQUEST_TYPE_2;
 				pag_req_3, header.message_type = PAGING_REQUEST_TYPE_3;
 			      other, OTHERWISE;
-			)" };
+			)"
+		 /* Total message length: 184 = 23 * 8. Pad spare bits with '2B'O. */
+		 variant "PADDING(184), PADDING_PATTERN('00101011'B)"
+	};
 
 	external function enc_GsmRrMessage(in GsmRrMessage msg) return octetstring
 		with { extension "prototype(convert) encode(RAW)" };

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15456
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5fe327383402956213c20a68b18b8a48381156b5
Gerrit-Change-Number: 15456
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190910/2f5ce54d/attachment.htm>


More information about the gerrit-log mailing list