aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-01-10 20:46:28 +0100
committerAlexander Couzens <lynxis@fe80.eu>2021-01-18 10:47:26 +0100
commita14b9d3089db3eb38d1c837a716f635c0bc28e6b (patch)
tree257deeb2037c9674af4bc0a3cfb9b91b5462623b
parentc4b746284f0181d4822f070435d9af7472164bd7 (diff)
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
-rw-r--r--src/gb/gprs_ns2_vty2.c4
1 files changed, 3 insertions, 1 deletions
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 */