summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-04-11 19:18:35 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-12 15:10:24 +0000
commitc7dddbd7d03c06af8c6879771305226e1d92d84b (patch)
treea067f4a09cd78d2a8970a72ca76a4eb34e85c338 /sgsn
parent1623774b6860a51c43cb977261fe96dfac76a724 (diff)
Ensure BcdMccMnc is encoded as 24.008 10.5.5.15
PCU is using BcdMccMnc as it's encoded as 24.008. But SGSN code is using it as it would be byte by byte sorted. Fixes: OS#3878 Change-Id: Ie8f67f16f18e4c5090bc5a4c46a866a7e7e00206
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn10
1 files changed, 6 insertions, 4 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 8b639e6..74cdece 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -137,15 +137,16 @@ type record BSSGP_ConnHdlrPars {
};
private function f_cellid_to_RAI(in BssgpCellId cell_id) return RoutingAreaIdentificationV {
+ /* mcc_mnc is encoded as of 24.008 10.5.5.15 */
var BcdMccMnc mcc_mnc := cell_id.ra_id.lai.mcc_mnc;
var RoutingAreaIdentificationV ret := {
mccDigit1 := mcc_mnc[0],
mccDigit2 := mcc_mnc[1],
mccDigit3 := mcc_mnc[2],
- mncDigit3 := mcc_mnc[5],
- mncDigit1 := mcc_mnc[3],
- mncDigit2 := mcc_mnc[4],
+ mncDigit3 := mcc_mnc[3],
+ mncDigit1 := mcc_mnc[4],
+ mncDigit2 := mcc_mnc[5],
lac := int2oct(cell_id.ra_id.lai.lac, 16),
rac := int2oct(cell_id.ra_id.rac, 8)
}
@@ -225,7 +226,8 @@ private function f_vty_enable_echo_interval(boolean enable) runs on test_CT {
}
-function f_init(BcdMccMnc mcc_mnc := '26242F'H) runs on test_CT {
+/* mcc_mnc is 24.008 10.5.5.15 encoded. 262 42 */
+function f_init(BcdMccMnc mcc_mnc := '262F42'H) runs on test_CT {
if (g_initialized == true) {
return;
}