From a14b9d3089db3eb38d1c837a716f635c0bc28e6b Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 10 Jan 2021 20:46:28 +0100 Subject: gprs_ns2: when calling nsvc_force_unconf for a dynamic NSE drop the NSE. The vty command is used for test cases to reset NSE state. So dynamic NSE shouldn't present. Related: SYS#5208 Change-Id: I0a4f35c974c8c3b79c48f2f56170722c95254332 --- src/gb/gprs_ns2_vty2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gb/gprs_ns2_vty2.c b/src/gb/gprs_ns2_vty2.c index 41daa742..5af8fbce 100644 --- a/src/gb/gprs_ns2_vty2.c +++ b/src/gb/gprs_ns2_vty2.c @@ -1491,7 +1491,9 @@ DEFUN_HIDDEN(nsvc_force_unconf, nsvc_force_unconf_cmd, return CMD_WARNING; } - if (nse->dialect == NS2_DIALECT_SNS) { + if (!nse->persistent) { + gprs_ns2_free_nse(nse); + } else if (nse->dialect == NS2_DIALECT_SNS) { gprs_ns2_free_nsvcs(nse); } else { /* Perform the operation for all nsvc */ -- cgit v1.2.3