aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 18:51:04 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:14 +0800
commita88742cf5ec7d398d39c7d0623a531d30e2f7189 (patch)
tree71bce98e77e8d9517d92adda93e7bab80d1d1730 /openbsc/src/nat/bsc_nat_vty.c
parent1395948e18ccf558d5c39ed1ba922d6f7e8a0390 (diff)
nat: Move MSC ip address into the config..
The address can still be specified on the cli and it will overwrite the config in the config file.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/nat/bsc_nat_vty.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c
index f0adfaaeb..a91da7c4e 100644
--- a/openbsc/src/nat/bsc_nat_vty.c
+++ b/openbsc/src/nat/bsc_nat_vty.c
@@ -55,6 +55,7 @@ static int config_write_nat(struct vty *vty)
vty_out(vty, " imsi allow %s%s", _nat->imsi_allow, VTY_NEWLINE);
if (_nat->imsi_deny)
vty_out(vty, " insi deny %s%s", _nat->imsi_deny, VTY_NEWLINE);
+ vty_out(vty, " msc ip %s%s", _nat->msc_ip, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -203,6 +204,15 @@ DEFUN(cfg_nat_imsi_deny,
return CMD_SUCCESS;
}
+DEFUN(cfg_nat_msc_ip,
+ cfg_nat_msc_ip_cmd,
+ "msc ip IP",
+ "Set the IP address of the MSC.")
+{
+ bsc_nat_set_msc_ip(_nat, argv[0]);
+ return CMD_SUCCESS;
+}
+
/* per BSC configuration */
DEFUN(cfg_bsc, cfg_bsc_cmd, "bsc BSC_NR", "Select a BSC to configure\n")
{
@@ -316,6 +326,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_default(NAT_NODE);
install_element(NAT_NODE, &cfg_nat_imsi_allow_cmd);
install_element(NAT_NODE, &cfg_nat_imsi_deny_cmd);
+ install_element(NAT_NODE, &cfg_nat_msc_ip_cmd);
/* BSC subgroups */
install_element(NAT_NODE, &cfg_bsc_cmd);