aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-06-06 18:47:36 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-06-18 08:55:44 +0200
commitd7d5e3b5ff23f2c2cdfc2bb49aaff47b2ec4af11 (patch)
treeac1cead535e7a8c737377f71881bd3e5da8a8c35
parent629be4db7be9ddd3e3f5f5f773111972a968fe16 (diff)
gprs/test: Added GMM Info and fixed TLLI
Add a DTAP GMM Information message with an IMSI in the BSSGP header to enable the association between IMSI and TLLI. The TLLI of the Routing Area Update messages is set to foreign. Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c20
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.ok30
2 files changed, 40 insertions, 10 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 8aef59f9e..a60bd0f13 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -66,9 +66,22 @@ static const unsigned char bssgp_attach_acc[88] = {
0xf4, 0xfb, 0xc5, 0x47, 0x22, 0x42, 0x67, 0x9a
};
+/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - GMM Information */
+static const unsigned char bssgp_gmm_information[66] = {
+ 0x00, 0xef, 0xe2, 0xb7, 0x00, 0x00, 0x50, 0x20,
+ 0x16, 0x82, 0x02, 0x58, 0x13, 0x99, 0x18, 0xb3,
+ 0x43, 0x2b, 0x25, 0x96, 0x62, 0x00, 0x60, 0x80,
+ 0x9a, 0xc2, 0xc6, 0x62, 0x00, 0x60, 0x80, 0xba,
+ 0xc8, 0xc6, 0x62, 0x00, 0x60, 0x80, 0x00, 0x0a,
+ 0x82, 0x08, 0x02, 0x0d, 0x88, 0x11, 0x12, 0x13,
+ 0x14, 0x15, 0x16, 0x17, 0x18, 0x00, 0x81, 0x00,
+ 0x0e, 0x88, 0x41, 0xc0, 0x09, 0x08, 0x21, 0x04,
+ 0xba, 0x3d
+};
+
/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - Routing Area Update Request */
static const unsigned char bssgp_ra_upd_req[85] = {
- 0x01, 0xaf, 0xe2, 0x80, 0x6e, 0x00, 0x00, 0x04,
+ 0x01, 0xbb, 0xc5, 0x46, 0x79, 0x00, 0x00, 0x04,
0x08, 0x88, 0x11, 0x22, 0x33, 0x40, 0x50, 0x60,
0x70, 0x80, 0x00, 0x80, 0x0e, 0x00, 0x3e, 0x01,
0xc0, 0x15, 0x08, 0x08, 0x10, 0x11, 0x22, 0x33,
@@ -83,7 +96,7 @@ static const unsigned char bssgp_ra_upd_req[85] = {
/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - Routing Area Update Accept */
static const unsigned char bssgp_ra_upd_acc[91] = {
- 0x00, 0xaf, 0xe2, 0x80, 0x6e, 0x00, 0x50, 0x20,
+ 0x00, 0xbb, 0xc5, 0x46, 0x79, 0x00, 0x50, 0x20,
0x16, 0x82, 0x02, 0x58, 0x13, 0x9d, 0x19, 0x13,
0x42, 0x33, 0x57, 0x2b, 0xf7, 0xc8, 0x48, 0x02,
0x13, 0x48, 0x50, 0xc8, 0x48, 0x02, 0x14, 0x48,
@@ -860,6 +873,9 @@ static void test_gbproxy_ra_patching()
send_ns_unitdata(nsi, NULL, &sgsn_peer, 0x1002,
bssgp_ra_upd_acc, sizeof(bssgp_ra_upd_acc));
+ send_ns_unitdata(nsi, NULL, &sgsn_peer, 0x1002,
+ bssgp_gmm_information, sizeof(bssgp_gmm_information));
+
/* Replace APN */
send_ns_unitdata(nsi, NULL, &bss_peer[0], 0x1002,
bssgp_act_pdp_ctx_req, sizeof(bssgp_act_pdp_ctx_req));
diff --git a/openbsc/tests/gbproxy/gbproxy_test.ok b/openbsc/tests/gbproxy/gbproxy_test.ok
index 40b537641..4609245a7 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.ok
+++ b/openbsc/tests/gbproxy/gbproxy_test.ok
@@ -1699,31 +1699,45 @@ MESSAGE to BSS at 0x01020304:1111, msg length 92
result (UNITDATA) = 92
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 10 02 00 ef e2 b7 00 00 50 20 16 82 02 58 13 99 18 b3 43 2b 25 96 62 00 60 80 9a c2 c6 62 00 60 80 ba c8 c6 62 00 60 80 00 0a 82 08 02 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 88 41 c0 09 08 21 04 ba 3d
+
+CALLBACK, event 0, msg length 66, bvci 0x1002
+00 ef e2 b7 00 00 50 20 16 82 02 58 13 99 18 b3 43 2b 25 96 62 00 60 80 9a c2 c6 62 00 60 80 ba c8 c6 62 00 60 80 00 0a 82 08 02 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 88 41 c0 09 08 21 04 ba 3d
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x1002, msg length 66
+00 ef e2 b7 00 00 50 20 16 82 02 58 13 99 18 b3 43 2b 25 96 62 00 60 80 9a c2 c6 62 00 60 80 ba c8 c6 62 00 60 80 00 0a 82 08 02 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 88 41 c0 09 08 21 04 ba 3d
+
+MESSAGE to BSS at 0x01020304:1111, msg length 70
+00 00 10 02 00 ef e2 b7 00 00 50 20 16 82 02 58 13 99 18 b3 43 2b 25 96 62 00 60 80 9a c2 c6 62 00 60 80 ba c8 c6 62 00 60 80 00 0a 82 08 02 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 88 41 c0 09 08 21 04 ba 3d
+
+result (UNITDATA) = 70
+
PROCESSING UNITDATA from 0x01020304:1111
-00 00 10 02 01 af e2 80 6e 00 00 04 08 88 11 22 33 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 11 22 33 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 96 3e 97
+00 00 10 02 01 ef e2 b7 00 00 00 04 08 88 11 22 33 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 11 22 33 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 96 3e 97
CALLBACK, event 0, msg length 85, bvci 0x1002
-01 af e2 80 6e 00 00 04 08 88 11 22 33 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 11 22 33 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 96 3e 97
+01 ef e2 b7 00 00 00 04 08 88 11 22 33 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 11 22 33 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 96 3e 97
NS UNITDATA MESSAGE to SGSN, BVCI 0x1002, msg length 85
-01 af e2 80 6e 00 00 04 08 88 21 63 54 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 21 63 54 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 1d f0 41
+01 ef e2 b7 00 00 00 04 08 88 21 63 54 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 21 63 54 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 1d f0 41
MESSAGE to SGSN at 0x05060708:32000, msg length 89
-00 00 10 02 01 af e2 80 6e 00 00 04 08 88 21 63 54 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 21 63 54 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 1d f0 41
+00 00 10 02 01 ef e2 b7 00 00 00 04 08 88 21 63 54 40 50 60 70 80 00 80 0e 00 3e 01 c0 15 08 08 10 21 63 54 40 50 60 1d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 19 8b b2 92 17 16 27 07 04 31 02 e5 e0 32 02 20 00 1d f0 41
result (UNITDATA) = 89
PROCESSING UNITDATA from 0x05060708:32000
-00 00 10 02 00 af e2 80 6e 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 21 63 54 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 c3 bf cc
+00 00 10 02 00 ef e2 b7 00 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 21 63 54 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 c3 bf cc
CALLBACK, event 0, msg length 91, bvci 0x1002
-00 af e2 80 6e 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 21 63 54 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 c3 bf cc
+00 ef e2 b7 00 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 21 63 54 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 c3 bf cc
NS UNITDATA MESSAGE to BSS, BVCI 0x1002, msg length 91
-00 af e2 80 6e 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 11 22 33 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 2e e5 fd
+00 ef e2 b7 00 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 11 22 33 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 2e e5 fd
MESSAGE to BSS at 0x01020304:1111, msg length 95
-00 00 10 02 00 af e2 80 6e 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 11 22 33 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 2e e5 fd
+00 00 10 02 00 ef e2 b7 00 00 50 20 16 82 02 58 13 9d 19 13 42 33 57 2b f7 c8 48 02 13 48 50 c8 48 02 14 48 50 c8 48 02 17 49 10 c8 48 02 00 0a 82 07 04 0d 88 11 12 13 14 15 16 17 18 00 81 00 0e 9d 41 c0 19 08 09 00 49 11 22 33 40 50 60 19 54 ab b3 18 05 f4 ef e2 81 17 17 16 2e e5 fd
result (UNITDATA) = 95