summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-11-28 14:11:25 +0100
committerHarald Welte <laforge@osmocom.org>2019-11-28 14:12:53 +0100
commit362141cc58ac4e480c09598b0ec65a28ad0b1f06 (patch)
treea5759201131f391e9112a5e597f66aaa9807a505
parentaf55d4a4a4368d20bc395a5c4712a612b7d954d7 (diff)
Skip dynamic ASPs when writing the list of ASPs in an AS
we handle this correctly in not writing the actual "asp" configuration, but we have a bug when writing the list of asps within one "as". Let's make sure to skip the dynamically-created ASPs there, too. Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Closes: OS#4284
-rw-r--r--src/osmo_ss7_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index ebae5a5..591254e 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1044,6 +1044,9 @@ static void write_one_as(struct vty *vty, struct osmo_ss7_as *as)
struct osmo_ss7_asp *asp = as->cfg.asps[i];
if (!asp)
continue;
+ /* skip any dynamically created ASPs (e.g. auto-created at connect time) */
+ if (asp->dyn_allocated || asp->simple_client_allocated)
+ continue;
vty_out(vty, " asp %s%s", asp->cfg.name, VTY_NEWLINE);
}
if (as->cfg.mode_set_by_vty)