aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-20 05:18:15 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-20 22:25:50 +0700
commitf2c3fa9144272b699d853dc2c6e48689447b9662 (patch)
treec5c8c9c118d7a14e206b327dec795963e59f6709
parente06f228be11ba0a7470213a33d8c2001bd9938c1 (diff)
library/RAN_Emulation.ttcnpp: fix: properly handle SAPI / DLCI for RANAP
Some of our SMS related test cases are failing. The problem is that SMS related RAN messages shall be sent on SAPI 3, as per GSM TS 04.11, section 2.3, while they actually being sent on SAPI 0. For the messages coming from the TCs towards OsmoMSC over RANAP, we need to convert from DLCI to SAPI in f_xmit_raw_l3(). OsmoMSC also needs to be patched, because it seems to ignore SAPI IE. Change-Id: I6199fd5f26774fb1ec419bc1ef9e1caeca3a0d35
-rw-r--r--library/RAN_Emulation.ttcnpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index b41d7eba..207adcd3 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -1096,9 +1096,15 @@ private function f_xmit_raw_l3(integer sccp_conn_id, OCT1 dlci, octetstring l3_e
#endif
#ifdef RAN_EMULATION_RANAP
case (RAN_PROTOCOL_RANAP) {
+ var template (omit) RANAP_IEs.SAPI sapi := omit;
var RANAP_PDU ranap;
- /* FIXME: convert DLCI into SAPI */
- ranap := valueof(ts_RANAP_DirectTransfer(l3_enc));
+
+ /* Perform DLCI -> SAPI transformation (x & 0x07) */
+ if (dlci and4b '07'O == '03'O) {
+ sapi := sapi_3;
+ }
+
+ ranap := valueof(ts_RANAP_DirectTransfer(l3_enc, sapi := sapi));
RANAP.send(ts_RANAP_DATA_req(sccp_conn_id, ranap));
}
#endif