aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 13:48:25 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 13:48:25 +0200
commitd597a543eef9273c119b75d9372218ebf9173247 (patch)
treea81767269dd36ffb33d87116068aebb447626d57
parent978c6392d7dc4f5bf302e272e045dfc0b9908cbe (diff)
ranap: fix tmsi byte order
-rw-r--r--src/ranap_msg_factory.c2
-rw-r--r--src/tests/test-ranap.ok4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 041e546..0d8ee81 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -417,7 +417,7 @@ struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, in
if (tmsi) {
uint32_t *tmsi_buf = CALLOC(1, sizeof(*tmsi_buf));
- *tmsi_buf = *tmsi;
+ *tmsi_buf = htonl(*tmsi);
ies.presenceMask |= PAGINGIES_RANAP_TEMPORARYUE_ID_PRESENT;
if (is_ps) {
ies.temporaryUE_ID.present = RANAP_TemporaryUE_ID_PR_p_TMSI;
diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok
index ca5fe03..841edad 100644
--- a/src/tests/test-ranap.ok
+++ b/src/tests/test-ranap.ok
@@ -79,9 +79,9 @@ Decoded Cause Misc=115
<RANAP_IE>
<id>64</id>
<criticality><ignore/></criticality>
- <value>00 67 45 23 01</value>
+ <value>00 01 23 45 67</value>
</RANAP_IE>
-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 67 45 23 01
+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
==> RAB ASSIGNMENT COMMAND (VOICE)
<RANAP_ProtocolIE-FieldPair>