gbproxy: Add test for NSEI and NSVCI changes
This checks the behavior of the gbproxy when the BSS peer changes the
NSEI and the NSVCI. It also tests BVC_RESET and other UNITDATA
messages after these changes between BSS and SGSN and vice versa (via
the gbproxy).
Ticket: OW#874
Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 6f7d1c3..f008b3e 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -881,6 +881,17 @@
return 0;
}
+void gbprox_reset()
+{
+ struct gbprox_peer *peer, *tmp;
+
+ llist_for_each_entry_safe(peer, tmp, &gbprox_bts_peers, list)
+ peer_free(peer);
+
+ rate_ctr_group_free(global_ctrg);
+ global_ctrg = NULL;
+}
+
static int gbprox_cleanup_peers(uint16_t nsei, uint16_t bvci)
{
int counter = 0;