aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gbproxy/gbproxy_test.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-05-23 20:48:07 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-22 16:07:01 +0200
commit736852825ab1e7f344a65e532bcb0cca54f5b630 (patch)
treebdf9c908a63dd153888dcfd7009eda778a2d74c4 /openbsc/tests/gbproxy/gbproxy_test.c
parent91fb6802360608a0d2757d4898bfd2387a2ebdcc (diff)
gprs: Add APN patch support for LLC/GSM messages
Patch the APN in every 'Activate PDP Context Request' message to the value given by the 'core-access-point-name' command. If the command is given without an APN, the whole APN IE will be removed. If the command is being prefixed by a 'no', the APN IE remains unmodified. The patch mode 'llc-gsm' is added to selectively enable the patching of LLC session management messages. This is enabled implicitely by the patch mode 'llc'. Note that the patch mode should not be set to a value not enabling the patching of LLC GSM messages ('llc-gsm', 'llc', and 'default' are sufficient to patch 'Activate PDP Context Request' messages). Ticket: OW#1192 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/gbproxy/gbproxy_test.c')
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index e93c354f6..33b0ac544 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -812,6 +812,8 @@ static void test_gbproxy_ra_patching()
gbcfg.nsip_sgsn_nsei = SGSN_NSEI;
gbcfg.core_mcc = 123;
gbcfg.core_mnc = 456;
+ gbcfg.core_apn = talloc_zero_size(NULL, 100);
+ gbcfg.core_apn_size = gbprox_str_to_apn(gbcfg.core_apn, "foo.bar", 100);
configure_sgsn_peer(&sgsn_peer);
configure_bss_peers(bss_peer, ARRAY_SIZE(bss_peer));
@@ -856,7 +858,8 @@ static void test_gbproxy_ra_patching()
&bss_peer[0], 0x1002,
bssgp_act_pdp_ctx_req, sizeof(bssgp_act_pdp_ctx_req));
- /* TODO: Re-configure to test APN IE removal */
+ gbcfg.core_apn[0] = 0;
+ gbcfg.core_apn_size = 0;
/* Remove APN */
send_ns_unitdata(nsi, "ACT PDP CTX REQ (REMOVE APN)",