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
This commit is contained in:
Daniel Willmann 2020-12-04 17:43:27 +01:00
parent f6a36cca6f
commit 5b89771fe2
1 changed files with 4 additions and 2 deletions

View File

@ -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;