diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2013-10-18 22:12:16 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-19 12:10:21 +0200 |
commit | da890c77330cd2e0f63ab0731fcc9cd2b2366c3c (patch) | |
tree | 0f5d50497ff9102b8c68df685eaf8cc207ffadd6 /openbsc/tests | |
parent | bc555742aa774a3d7b744213c558e90b6617d9e7 (diff) |
gbproxy: Test invalid BVCI from SGSN
This adds a test with a UNITDATA SGSN message that is addressed to an
invalid (unknown) BVCI. The test shows, that the message is echoed to
the SGSN.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/gbproxy/gbproxy_test.c | 8 | ||||
-rw-r--r-- | openbsc/tests/gbproxy/gbproxy_test.ok | 18 |
2 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index 21ee723ce..e1e6587ba 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -523,6 +523,8 @@ static void test_gbproxy() gprs_dump_nsi(nsi); gbprox_dump_peers(stdout, 0, 1); + gbprox_dump_global(stdout, 0, 1); + send_bssgp_reset_ack(nsi, &sgsn_peer, 0x1002); printf("--- Send message from BSS 1 to SGSN, BVCI 0x1002 ---\n\n"); @@ -533,6 +535,12 @@ static void test_gbproxy() send_ns_unitdata(nsi, NULL, &sgsn_peer, 0x1012, (uint8_t *)"", 0); + printf("--- Send message from SGSN to BSS 1, BVCI 0x10ff (invalid) ---\n\n"); + + send_ns_unitdata(nsi, NULL, &sgsn_peer, 0x10ff, (uint8_t *)"", 0); + + gbprox_dump_global(stdout, 0, 1); + gprs_ns_destroy(nsi); nsi = NULL; } diff --git a/openbsc/tests/gbproxy/gbproxy_test.ok b/openbsc/tests/gbproxy/gbproxy_test.ok index e4b7aba6f..fcde39f20 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.ok +++ b/openbsc/tests/gbproxy/gbproxy_test.ok @@ -749,6 +749,7 @@ Peers: NSEI mismatch : 1 NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96 NSEI mismatch : 1 +Gbproxy global: PROCESSING BVC_RESET_ACK from 0x05060708:32000 00 00 00 00 23 04 82 10 02 @@ -795,5 +796,22 @@ MESSAGE to BSS at 0x01020304:1111, msg length 4 result (UNITDATA) = 4 +--- Send message from SGSN to BSS 1, BVCI 0x10ff (invalid) --- + +PROCESSING UNITDATA from 0x05060708:32000 +00 00 10 ff + +CALLBACK, event 0, msg length 0, bvci 0x10ff + + +NS UNITDATA MESSAGE to SGSN, BVCI 0x10ff, msg length 0 + + +MESSAGE to SGSN at 0x05060708:32000, msg length 4 +00 00 10 ff + +result (UNITDATA) = 4 + +Gbproxy global: ===== NS protocol test END |