aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gbproxy
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-16 14:10:27 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-19 11:21:01 +0200
commit1a02442f664aa43c7182a0646d8ed958eeb45a50 (patch)
treece84e7d85c513c888f733c22dbfe788d985f6a91 /openbsc/tests/gbproxy
parent04f679be734709de387087c7ef91d8010cff6a46 (diff)
gbproxy: Check other tlli_infos for matching TLLI/P-TMSI
Currently it is possible to create serveral entries referring to the same P-TMSI/TLLI by using P-TMSI assigment via Attach Accept or RA Update Accept messages. This can lead to the use of the wrong tlli_info. This patch adds gbproxy_remove_matching_tllis() that removes all conflicting entries. This function is called after the P-TMSIs and the resulting TLLIs has been set up. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/gbproxy')
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c4
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.ok15
2 files changed, 8 insertions, 11 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 46aa931b0..6b5843e0c 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -1833,10 +1833,10 @@ static void test_gbproxy_ptmsi_assignment()
tlli_info = gbproxy_find_tlli_by_imsi(peer, imsi2, ARRAY_SIZE(imsi2));
OSMO_ASSERT(tlli_info);
OSMO_ASSERT(tlli_info->tlli.ptmsi == ptmsi);
- /* OSMO_ASSERT(!gbproxy_find_tlli_by_imsi(peer, imsi1, ARRAY_SIZE(imsi1))); */
+ OSMO_ASSERT(!gbproxy_find_tlli_by_imsi(peer, imsi1, ARRAY_SIZE(imsi1)));
tlli_info2 = gbproxy_find_tlli(peer, local_tlli);
- /* OSMO_ASSERT(tlli_info == tlli_info2); */
+ OSMO_ASSERT(tlli_info == tlli_info2);
OSMO_ASSERT(tlli_info->tlli.assigned == 0);
OSMO_ASSERT(tlli_info->tlli.current == local_tlli);
OSMO_ASSERT(tlli_info->tlli.ptmsi == ptmsi);
diff --git a/openbsc/tests/gbproxy/gbproxy_test.ok b/openbsc/tests/gbproxy/gbproxy_test.ok
index bcf574016..bbb2c5486 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.ok
+++ b/openbsc/tests/gbproxy/gbproxy_test.ok
@@ -1784,10 +1784,9 @@ result (ATTACH ACCEPT) = 92
Peers:
NSEI 4096, BVCI 4098, not blocked, RAI 112-332-16464-96
Attach Request count : 2
- TLLI cache size : 2
- TLLI-Cache: 2
+ TLLI cache size : 1
+ TLLI-Cache: 1
TLLI 8000beef/efe2b700 -> 8000beef/efe2b700, IMSI 12199999961718, AGE 0
- TLLI efe2b700 -> efe2b700, IMSI 12131415161718, AGE 0
PROCESSING ATTACH COMPLETE from 0x01020304:1111
00 00 10 02 01 ef e2 b7 00 00 00 04 08 88 11 22 33 40 50 60 12 34 00 80 0e 00 08 01 c0 15 08 03 86 ac 47
@@ -1803,10 +1802,9 @@ result (ATTACH COMPLETE) = 35
Peers:
NSEI 4096, BVCI 4098, not blocked, RAI 112-332-16464-96
Attach Request count : 2
- TLLI cache size : 2
- TLLI-Cache: 2
+ TLLI cache size : 1
+ TLLI-Cache: 1
TLLI 8000beef/efe2b700 -> 8000beef/efe2b700, IMSI 12199999961718, AGE 0
- TLLI efe2b700 -> efe2b700, IMSI 12131415161718, AGE 0
PROCESSING GMM INFO 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 99 99 99 16 17 18 00 81 00 0e 88 41 c0 15 08 21 bb c1 c6
@@ -1822,10 +1820,9 @@ result (GMM INFO) = 70
Peers:
NSEI 4096, BVCI 4098, not blocked, RAI 112-332-16464-96
Attach Request count : 2
- TLLI cache size : 2
- TLLI-Cache: 2
+ TLLI cache size : 1
+ TLLI-Cache: 1
TLLI efe2b700 -> efe2b700, IMSI 12199999961718, AGE 0
- TLLI efe2b700 -> efe2b700, IMSI 12131415161718, AGE 0
Gbproxy global:
=== test_gbproxy_ra_patching ===
--- Initialise SGSN ---