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
This commit is contained in:
Harald Welte 2019-11-28 14:11:25 +01:00
parent af55d4a4a4
commit 362141cc58
1 changed files with 3 additions and 0 deletions

View File

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