aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2020-11-03 21:12:42 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2020-11-06 22:21:16 +0100
commit15c9da226b7bacff1841c0a2b21e36a4ffc4f0bf (patch)
treedc9d16b28652b145c698cd13bb13c3d9c3a774e5
parent8bca8de5cbfb19c5fb655d39dcd383878e2dcb8e (diff)
gbproxy: Add todo for BVC RESET logic
When we receive a signalling BVC RESET from the SGSN we want to reset the signalling BVCs for every peer. Change-Id: I98c1a53d0e4b9a988e9ddec97ce0c67ded6f6326 Related: SYS#4998
-rw-r--r--src/gbproxy/gb_proxy.c11
-rw-r--r--tests/gbproxy/gbproxy_test.ok2
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 2ce74643..e8a81e76 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1218,7 +1218,16 @@ static int gbprox_rx_sig_from_sgsn(struct gbproxy_config *cfg,
case BSSGP_PDUT_BVC_RESET_ACK:
if (cfg->route_to_sgsn2 && nsei == cfg->nsip_sgsn2_nsei)
break;
- /* fall through */
+ /* simple case: BVCI IE is mandatory */
+ if (!TLVP_PRESENT(&tp, BSSGP_IE_BVCI))
+ goto err_mand_ie;
+ bvci = ntohs(tlvp_val16_unal(&tp, BSSGP_IE_BVCI));
+ if (bvci == BVCI_SIGNALLING) {
+ /* TODO: Reset all PTP BVCIs */
+ } else {
+ rc = gbprox_relay2bvci(cfg, msg, bvci, ns_bvci);
+ }
+ break;
case BSSGP_PDUT_FLUSH_LL:
/* simple case: BVCI IE is mandatory */
if (!TLVP_PRESENT(&tp, BSSGP_IE_BVCI))
diff --git a/tests/gbproxy/gbproxy_test.ok b/tests/gbproxy/gbproxy_test.ok
index 50c7cd75..6f20f129 100644
--- a/tests/gbproxy/gbproxy_test.ok
+++ b/tests/gbproxy/gbproxy_test.ok
@@ -3236,7 +3236,6 @@ NS2 CALLBACK, prim 0, msg length 5, bvci 0x0000
23 04 82 10 02
Gbproxy global:
- Invalid BVC Identifier : 1
Patch error: no peer : 1
Peers:
NSEI 4096, BVCI 4098, not blocked, RAI 112-332-16464-96
@@ -4307,7 +4306,6 @@ Peers:
Detach Accept count : 3
TLLI-Cache: 0
Gbproxy global:
- Invalid BVC Identifier : 1
BSSGP protocol error (SGSN): 2
Patch error: no peer : 1
=== test_gbproxy_keep_info ===