summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-06 20:38:21 +0100
committerpespin <pespin@sysmocom.de>2020-11-10 12:55:33 +0000
commita05b2bc8a33e4dc40e850c803081936cb2f24abf (patch)
treece3c23079728a656dbca96ef8e65bccc4a9f1363 /library
parent081b1680608143ec2c08bc1b0b4a5b8b17a562ed (diff)
RLCMAC_EncDec: Fix Encoding of TLLI in UlEgprsDataBlock
Diffstat (limited to 'library')
-rw-r--r--library/RLCMAC_EncDec.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/RLCMAC_EncDec.cc b/library/RLCMAC_EncDec.cc
index c5fc447..4dba35a 100644
--- a/library/RLCMAC_EncDec.cc
+++ b/library/RLCMAC_EncDec.cc
@@ -1291,7 +1291,13 @@ OCTETSTRING enc__RlcmacUlEgprsDataBlock(const RlcmacUlEgprsDataBlock& si)
if (in.tlli__ind()) {
- aligned_buffer.put_string(in.tlli());
+ /* The TLLI is encoded in little endian for EGPRS (see
+ * TS 44.060, figure 10.3a.2.1, note 2) */
+ OCTETSTRING tlli = in.tlli();
+ aligned_buffer.put_c(tlli[3].get_octet());
+ aligned_buffer.put_c(tlli[2].get_octet());
+ aligned_buffer.put_c(tlli[1].get_octet());
+ aligned_buffer.put_c(tlli[0].get_octet());
}
if (in.mac__hdr().pfi__ind()) {