aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sgsn/sgsn_vty.c14
-rw-r--r--tests/test_nodes.vty1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index 14248d1d..33a652c9 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -186,6 +186,8 @@ static int config_write_sgsn(struct vty *vty)
vty_out(vty, "sgsn%s", VTY_NEWLINE);
+ vty_out(vty, " gtp state-dir %s%s",
+ g_cfg->gtp_statedir, VTY_NEWLINE);
vty_out(vty, " gtp local-ip %s%s",
inet_ntoa(g_cfg->gtp_listenaddr.sin_addr), VTY_NEWLINE);
@@ -315,6 +317,17 @@ DEFUN(cfg_sgsn, cfg_sgsn_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_sgsn_state_dir, cfg_sgsn_state_dir_cmd,
+ "gtp state-dir PATH",
+ "GTP Parameters\n"
+ "Set the directory for the GTP State file\n"
+ "Local Directory\n")
+{
+ osmo_talloc_replace_string(sgsn, &sgsn->cfg.gtp_statedir, argv[0]);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_sgsn_bind_addr, cfg_sgsn_bind_addr_cmd,
"gtp local-ip A.B.C.D",
"GTP Parameters\n"
@@ -1432,6 +1445,7 @@ int sgsn_vty_init(struct sgsn_config *cfg)
install_element(CONFIG_NODE, &cfg_sgsn_cmd);
install_node(&sgsn_node, config_write_sgsn);
+ install_element(SGSN_NODE, &cfg_sgsn_state_dir_cmd);
install_element(SGSN_NODE, &cfg_sgsn_bind_addr_cmd);
install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd);
//install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index 18bccc8f..109e2ece 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -27,6 +27,7 @@ OsmoSGSN(config)# list
OsmoSGSN(config)# sgsn
OsmoSGSN(config-sgsn)# list
...
+ gtp state-dir PATH
gtp local-ip A.B.C.D
ggsn <0-255> remote-ip A.B.C.D
ggsn <0-255> gtp-version (0|1)