aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2020-12-04 17:43:27 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2020-12-04 17:49:19 +0100
commit9a2fc908df052c83da3d8f14141ed9d32cdbccea (patch)
treef67cbc9206cbd4611dab418e0ae2ba0c3d57ce50 /src
parente794c1f00b3907fcad7e0ddefce1cfad79e1eb67 (diff)
gbproxy: Delete gbproxy_nse in delete-gbproxy-peer VTY command
The gbproxy_nse is created when the signalling BVC is resetted. When we delete all bvcs of an nsei we need to remove it as well. Change-Id: I997b29fef93188565f81bd403bc68840473958c3 Related: SYS#5002
Diffstat (limited to 'src')
-rw-r--r--src/gbproxy/gb_proxy_vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gbproxy/gb_proxy_vty.c b/src/gbproxy/gb_proxy_vty.c
index 379b8c23..bf1c4e0d 100644
--- a/src/gbproxy/gb_proxy_vty.c
+++ b/src/gbproxy/gb_proxy_vty.c
@@ -696,9 +696,11 @@ DEFUN(delete_gb_nsei, delete_gb_nsei_cmd,
delete_bvc = delete_nsvc = 1;
if (delete_bvc) {
- if (!dry_run)
+ if (!dry_run) {
+ struct gbproxy_nse *nse = gbproxy_nse_by_nsei(g_cfg, nsei);
counter = gbproxy_cleanup_peers(g_cfg, nsei, 0);
- else {
+ gbproxy_nse_free(nse);
+ } else {
struct gbproxy_nse *nse;
struct gbproxy_peer *peer;
counter = 0;