From 362141cc58ac4e480c09598b0ec65a28ad0b1f06 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 28 Nov 2019 14:11:25 +0100 Subject: 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 --- src/osmo_ss7_vty.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3