aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/bsc_msg_filter.h2
-rw-r--r--openbsc/src/libfilter/bsc_msg_vty.c10
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c2
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c5
4 files changed, 14 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/bsc_msg_filter.h b/openbsc/include/openbsc/bsc_msg_filter.h
index dc971a4f8..22b8447cc 100644
--- a/openbsc/include/openbsc/bsc_msg_filter.h
+++ b/openbsc/include/openbsc/bsc_msg_filter.h
@@ -104,4 +104,4 @@ struct bsc_msg_acc_lst_entry *bsc_msg_acc_lst_entry_create(struct bsc_msg_acc_ls
int bsc_msg_acc_lst_check_allow(struct bsc_msg_acc_lst *lst, const char *imsi);
void bsc_msg_acc_lst_vty_init(void *ctx, struct llist_head *lst, int node);
-void bsc_msg_acc_lst_write(struct vty *vty, struct bsc_msg_acc_lst *lst);
+void bsc_msg_acc_lst_write(struct vty *vty);
diff --git a/openbsc/src/libfilter/bsc_msg_vty.c b/openbsc/src/libfilter/bsc_msg_vty.c
index 06f38764c..668e399d8 100644
--- a/openbsc/src/libfilter/bsc_msg_vty.c
+++ b/openbsc/src/libfilter/bsc_msg_vty.c
@@ -111,7 +111,7 @@ DEFUN(cfg_lst_imsi_deny,
return CMD_SUCCESS;
}
-void bsc_msg_acc_lst_write(struct vty *vty, struct bsc_msg_acc_lst *lst)
+static void bsc_msg_acc_lst_write_one(struct vty *vty, struct bsc_msg_acc_lst *lst)
{
struct bsc_msg_acc_lst_entry *entry;
@@ -127,6 +127,14 @@ void bsc_msg_acc_lst_write(struct vty *vty, struct bsc_msg_acc_lst *lst)
}
}
+void bsc_msg_acc_lst_write(struct vty *vty)
+{
+ struct bsc_msg_acc_lst *lst;
+ llist_for_each_entry(lst, _acc_lst, list) {
+ bsc_msg_acc_lst_write_one(vty, lst);
+ }
+}
+
void bsc_msg_acc_lst_vty_init(void *ctx, struct llist_head *lst, int node)
{
_ctx = ctx;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index e124b31fc..66e59bdf0 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -221,6 +221,8 @@ static int config_write_bsc(struct vty *vty)
if (bsc->acc_lst_name)
vty_out(vty, " access-list-name %s%s", bsc->acc_lst_name, VTY_NEWLINE);
+ bsc_msg_acc_lst_write(vty);
+
return CMD_SUCCESS;
}
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 7ddcb5750..eba968a4f 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -129,7 +129,6 @@ static int config_write_bsc(struct vty *vty)
static int config_write_nat(struct vty *vty)
{
- struct bsc_msg_acc_lst *lst;
struct bsc_nat_paging_group *pgroup;
vty_out(vty, "nat%s", VTY_NEWLINE);
@@ -179,8 +178,8 @@ static int config_write_nat(struct vty *vty)
vty_out(vty, " prefix-tree %s%s",
_nat->num_rewr_trie_name, VTY_NEWLINE);
- llist_for_each_entry(lst, &_nat->access_lists, list)
- bsc_msg_acc_lst_write(vty, lst);
+ bsc_msg_acc_lst_write(vty);
+
llist_for_each_entry(pgroup, &_nat->paging_groups, entry)
write_pgroup_lst(vty, pgroup);
if (_nat->mgcp_ipa)