bsc_vty: Write access list entries when storing bsc config

Change-Id: Ice8ce203a52b918e1eddb56ea437d082efd634bc
This commit is contained in:
Pau Espin 2018-06-28 12:50:45 +02:00
parent 1e75d131c9
commit d99182c010
3 changed files with 12 additions and 2 deletions

View File

@ -100,4 +100,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_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);

View File

@ -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_lst_vty_init(void *ctx, struct llist_head *lst, int node)
{
_ctx = ctx;

View File

@ -222,6 +222,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;
}