nat: Provide a USSD access list to check for which to play HLR.

This commit is contained in:
Holger Hans Peter Freyther 2010-10-10 17:29:20 +02:00
parent 17870cf533
commit d1effd835f
2 changed files with 18 additions and 0 deletions

View File

@ -232,6 +232,9 @@ struct bsc_nat {
/* filter */
char *acc_lst_name;
/* USSD messages we want to match */
char *ussd_lst_name;
/* statistics */
struct bsc_nat_statistics stats;
};

View File

@ -78,6 +78,8 @@ static int config_write_nat(struct vty *vty)
vty_out(vty, " ip-dscp %d%s", _nat->bsc_ip_dscp, VTY_NEWLINE);
if (_nat->acc_lst_name)
vty_out(vty, " access-list-name %s%s", _nat->acc_lst_name, VTY_NEWLINE);
if (_nat->ussd_lst_name)
vty_out(vty, " ussd-list-name %s%s", _nat->ussd_lst_name, VTY_NEWLINE);
llist_for_each_entry(lst, &_nat->access_lists, list) {
write_acc_lst(vty, lst);
@ -395,6 +397,18 @@ DEFUN(cfg_nat_acc_lst_name,
return CMD_SUCCESS;
}
DEFUN(cfg_nat_ussd_lst_name,
cfg_nat_ussd_lst_name_cmd,
"ussd-list-name NAME",
"Set the name of the access list to check for IMSIs for USSD message\n"
"The name of the access list for HLR USSD handling")
{
if (_nat->ussd_lst_name)
talloc_free(_nat->ussd_lst_name);
_nat->ussd_lst_name = talloc_strdup(_nat, argv[0]);
return CMD_SUCCESS;
}
/* per BSC configuration */
DEFUN(cfg_bsc, cfg_bsc_cmd, "bsc BSC_NR", "Select a BSC to configure")
{
@ -632,6 +646,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element(NAT_NODE, &cfg_nat_bsc_ip_dscp_cmd);
install_element(NAT_NODE, &cfg_nat_bsc_ip_tos_cmd);
install_element(NAT_NODE, &cfg_nat_acc_lst_name_cmd);
install_element(NAT_NODE, &cfg_nat_ussd_lst_name_cmd);
/* access-list */
install_element(NAT_NODE, &cfg_lst_imsi_allow_cmd);